Hello @Andrew Shlykov,Thank you for your time during the Teams call.
As we discussed and troubleshooted, we were able to identify the cause of the issue in your environment. The issue occurred because the app registration was created with the support type set to "Accounts in this organizational directory only (tenant B2C only - Single tenant)." To authenticate users in B2C using user flows, the application must be created with the support type "Accounts in any identity provider or organizational directory (for authenticating users with user flows)." After making this change, you were able to generate the access token successfully.
Please refer to the sample screenshot below for reference.
I hope this information is helpful. Please feel free to reach out if you have any further questions.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Thanks,
Raja Pothuraju.