[英]How to get country from Microsoft Graph API for Office 365?
I want to fetch country of the logged in user using Graph API of Microsoft for Office 365. 我想使用Microsoft的Office 365的Graph API提取登录用户的国家/地区。
I have downloaded code snippets for Microsoft Graph API in which I checked about the same. 我已经下载了Microsoft Graph API的代码段,并在其中进行了检查。 But it seems there is no any way to get it.
但是似乎没有任何办法可以得到它。
Is it possible to fetch country using Graph API? 是否可以使用Graph API获取国家/地区? If yes then what process should I follow?
如果是,那我应该遵循什么程序?
There is a country property on the User Object, which is not required to be populated. 用户对象上有一个国家/地区属性,不需要填充。 There is also 'preferredLanugage', 'postalCode', etc... check them all out here
还有“ preferredLanugage”,“ postalCode”等...请在此处全部检查
Here is an example of a graph api request to get the country code of the logged in user, using the 'me' endpoint: 这是一个图形api请求的示例,该示例使用'me'端点获取登录用户的国家/地区代码:
https://graph.windows.net/me/country
You can try it using the Graph Explorer (Note you will have to be signed in for this to work.) 您可以使用Graph Explorer尝试一下(请注意,您必须先登录才能正常使用。)
More information on how to do stuff with a signed in user here . 有关如何使用已登录用户执行操作的更多信息,请参见此处 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.