0

I'm trying to use React and Azure B2C to sign-up a local account (using personal emails). I'm able to sign-up and login using userflows, however, I cannot get active account information from MsGraph API.

GET https://graph.microsoft.com/v1.0/me 401 (Unauthorized)

1 Answers1

0

Yes ,azure AD b2c supports authentication for personal accounts,

1.

Microsoft Graph supports optional query parameters that you can use to specify and control the amount of data returned in a response. The support for the exact query parameters varies from one API operation to another, and depending on the API, can differ between the v1.0 and beta endpoints.

Use query parameters to customize responses - Microsoft Graph | Microsoft Docs

Try with GET https://graph.microsoft.com/beta/me/ You can use use $select to control the properties returned, Ex: /me?$select=displayName,jobTitle

2. Do make sure to give required claims marked in application claims.

enter image description here

If you want to acquire a token for all the static scopes of a v1.0 application, append ".default" to the app ID URI of the API: app ID/.default

Calling the /me endpoint requires a signed-in user and therefore a delegated permission. Application permissions are not supported when using the /me endpoint.

Article says

Users cannot obtain tokens for Microsoft APIs (e.g. MS Graph API) using delegated permissions. Applications can obtain tokens for Microsoft APIs using application permissions (user management scenarios).

Reference: microsoft-graph-operations#user-flow-authentication-methods-beta

kavyaS
  • 8,026
  • 1
  • 7
  • 19