I want to use GraphAPI in ROPC including redirect authentication of ADFS.

大坂 翔 141 Reputation points
2021-09-22T13:55:21.57+00:00

I want to use GraphAPI in ROPC including redirect authentication of ADFS.
I have to use graphapi in the ROPC method, but perhaps because of ADFS authentication, the following error occurs when obtaining an access token.
-------------‐-------
Error validating credentials due to invalid username or password.


Probably because there is federated authentication, but the authentication screen uses the same UPN and PASSWORD.
How can I use access tokens?

The development environment is Node.js

I am very troubled, so I would be happy if you could tell me if there is a detailed person.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,715 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,664 questions
0 comments No comments
{count} votes

Accepted answer
  1. AmanpreetSingh-MSFT 56,311 Reputation points
    2021-09-23T07:20:41.373+00:00

    Hi @大坂 翔 • Thank you for reaching out.

    In case of ROPC flow, the credentials are directly checked against Azure AD and redirection to ADFS doesn't happen. However, you can use Azure policy to configure specific application(s) to do the password validation on the cloud without removing the federation. For this purpose, you can follow the steps I have provided in my blog post: ROPC (Username/Password) flow fails with AADSTS50126: Invalid username or password for federated users

    If you don't want to enable Password Hash Sync for all users in the tenant, you may consider Selective password hash synchronization configuration for Azure AD Connect.

    -----------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


0 additional answers

Sort by: Most helpful