Hi @Tom Flanagan ,
I understand that you are receiving the AADSTS50126 error even though the correct password is entered.
If the account is using federated authentication, this error is also expected. This is because if you have Federated authentication enabled for user sign-in, you get redirected to the federated IDP for credential validation. When you are using the ROPC flow via postman, this redirection is not possible and it results in the "Invalid username or password" error.
Note that federated authentication does not just mean that you are using ADFS. You can use 3rd party IDPs such as Auth0, OneLogin, and others. You will know that you are using federated authentication if you see the below image while signing in via browser with the same account:
Alternatively, to make this scenario working with Federated accounts,
- Sync users' passwords to Azure AD. If you don't want to sync password for entire organization, you may consider using Selective Password Hash Sync.
- Create a policy to allow credentials validation of federated users from within Azure AD.
- Link the policy to the application, for which you want to use ROPC flow with federated accounts.
Please refer to these threads -
https://learn.microsoft.com/en-us/answers/questions/385629/index.html
https://learn.microsoft.com/en-us/answers/questions/38035/index.html
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.