Could anyone suggest some way to retrieve user info from AzureAD using JSOM or REST API only..


You can use the Azure Graph API in the postman tool to get the exact query.

Please read the below steps how to get - steps are originally explained here.

Microsoft introduces Graph APIs for fetching user details and roles attached. User Detail API:


Authorization:Access Token

Access token you can generate using resource as https://graph.windows.net/ and authentication endpoint as https://login.microsoftonline.com/.

Note: You must have Microsoft Graph API Permission as well.

Below are some other graph API endpoints:


Directory roles:


List the users with roles:



You could create SPFx solution to call Graph api to get user profile.

Official tutorial here

    .then((client: AadHttpClient) => {
      // Search for the users with givenName, surname, or displayName equal to the searchFor value
      return client
  • Can we use graph API in a JSOM based running solution? – Tezz Chaudhary Apr 23 '20 at 6:17
  • Can't do this yet. – Lee_MSFT Apr 23 '20 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.