skip to Main Content

I’ve an Azure AD app setup, the Rest api’s under scope: user_impersonation works but I also need user profile info from some GET API request (with same scope as I cannot have two scopes under one access token). I could not find a suitable API for it.So, any help in this regards will be highly appreciated.

Thanks in advance!

2

Answers


  1. As you are making requests to different APIs, you will need to request separate access tokens for this information.

    In the case of user profile information, you will need to request a token for the Graph API resource with the User.Read scope.

    Depending on the type of application, you can either request this information on behalf of a user or as a service. When requesting as a service, you need to grant the User.Read.All permission instead (docs.

    Login or Signup to reply.
  2. You can use Profile API in Microsoft Graph to retrieve yourself and another user profile.

    Using Profile API use for retrieve the sing-in user profile information together Azure AD or account information. This information we can use in application as requirements and we can store as requirements.

    when you use these API you will need to valid permissions to access profile information.
    Example : https://graph.microsoft.com/beta/me/profile/

    enter image description here

    More information about Use the Profile API read these official document by Microsoft Documents.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search