Not able to retrieve the user's country via Microsoft Graph

Nghia Tran 0 Reputation points
2024-09-27T17:21:40.3433333+00:00

Hi guys,

My application is using Microsoft as an authentication provider. When a user signed in, I can use the Microsoft token to query to the endpoint https://graph.microsoft.com/v1.0/me, it returned the correct information of that user. However, when I tried to get that user's country, I tried with: https://graph.microsoft.com/v1.0/me?$select=country but the country is not returned in the response even that user has set the country on his profile to US already.

My application on Azure already has the permission User.Read which mean after a user signed in, I can query to get user information. Not sure what is incorrect here but I have been stuck at this point for a while. Looking forward to see some help here. Thank you all

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

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.