Hi @Kumar, Rajeev (CWF) · Thank you for reaching out.
By tracking the Correlation and Request ID, I found that the account you are using is a federated account, which requires redirection to ADFS for authentication. The ROPC (password) flow doesn't support this redirection and tries to authenticate the user directly in Azure AD. Hence, the error AADSTS50126: Error validating credentials due to invalid username or password.
is thrown.
To resolve the issue, you can choose to go with one of the below options:
- Create a cloud only user account, reset the temporary password and use that account.
- If creating cloud-only user is not an option for you, follow the instructions I have provided in This Blog Post. If you choose to go with this option and don't want to sync password hash for all accounts, use Selective password hash synchronization
-----------------------------------------------------------------------------------------------------------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.