Unable to get the user details while using Microsoft Graph API.

Mallesh Jambagi 21 Reputation points

Initially I was using Http Client and Azure Graph API.But when i migrated to Microsoft Graph API ,I am able to generate only the access Token using Microsoft Graph API and Http Client successfully.I am unable to retrieve the user details using Http Client.Whenever I try to fetch the user details,the HttpClient connection is closing and shutting down for the URL GET https://graph.microsoft.com/v1.0/users/?&$top=500 .What might be the issue?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,836 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. JosephXu-MSFT 531 Reputation points

    Hi @Mallesh Jambagi .

    1. You can try to add Microsft graph api permissions User.Read.All in your app at azure app registrations.
    2. Type in User at search tab.
    3. Select User.Read.All.
    4. Then click grant admin constent for ... , we can see the status Granted.
    0 comments No comments

  2. Mallesh Jambagi 21 Reputation points

    Hi @JosephXu-MSFT
    I have added the above permissions.But still it is not working for HttpClient while using Microsoft Graph API.

  3. Mallesh Jambagi 21 Reputation points


    This is the error i am facing when i try to fetch the Users.

    0 comments No comments