Was trying to utilize ROPC (Resource Owner Password Credentials) flow to login in through Azure AD B2C.
Followed this documentation: https://learn.microsoft.com/en-us/azure/active-directory-b2c/add-ropc-policy?tabs=app-reg-ga&pivots=b2c-custom-policy
The only doubt I had was in Step 4 - whether ValidTokenIssuerPrefixes is supposed to be https://sts.windows.net/ anyways I tried the custom policy without changing this value.
After running the custom policy and making a REST request as below:
POST /<tenant-name>.onmicrosoft.com/B2C_1A_ROPC_Auth/oauth2/v2.0/token HTTP/1.1
Host: <tenant-name>.b2clogin.com
Content-Type: application/x-www-form-urlencoded
username=contosouser.outlook.com.ws&password=Passxword1&grant_type=password&scope=openid+bef22d56-552f-4a5b-b90a-1988a7d634ce+offline_access&client_id=bef22d56-552f-4a5b-b90a-1988a7d634ce&response_type=token+id_token
I get the following 500 error response:
OData error