Azure graph API issue

Payal Radadiya 21 Reputation points
2022-11-10T10:15:24.4+00:00

Hello,
I'm a developer and tried to access user's data from my organization via calling Azure graph API. But have a problem accessing data and got an error 401 unauthorized.
Also gave all graph permissions on the Azure portal but still, I'm not able to get that data.
I do not have any type of subscription, should I need to Buy a subscription?
Please give a solution.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,935 questions
Microsoft Security | Microsoft Entra | Microsoft Entra ID
Microsoft Security | Microsoft Graph
{count} votes

Accepted answer
  1. CarlZhao-MSFT 46,371 Reputation points
    2022-11-11T07:31:17.56+00:00

    Hi @Payal Radadiya

    You get a token for MS Graph instead of Azure AD Graph, and a 401 unauthorized error is reported when you use that token to call the Azure AD Graph API. The Azure AD Graph API is currently deprecated and will be retired in the near future. As part of this deprecation path, adding Azure AD Graph permissions to an app registration through the Azure portal is now disabled. I recommend that you use the MS Graph API to list tenant users

    GET https://graph.microsoft.com/v1.0/users  
    

    However, your app might still temporarily require Azure AD Graph permissions to access resources. This article describes the following four methods for configuring required Azure AD Graph permissions for your app registration.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.