当前位置: 动力学知识库 > 问答 > 编程问答 >

How to get information of signed in user by Outlook rest api

问题描述:

After a user signed in a web app that uses outlook api with microsoft account, how do we get the profile information of that user, e.g. email address, display name or event the profile photo? A user might have multiple microsoft accounts and need to know which accout he/she is signing in. I didn't find anything related in https://msdn.microsoft.com/en-us/office/office365/api/use-outlook-rest-api

网友答案:

You can find information about the user in the ID token that comes back as part of the signin process. Here's a good article on ID token when using the Azure v1 auth: http://andrewconnell.com/blog/azure-ad-oauth2-openid-connect. Here's the docs for v2: https://azure.microsoft.com/en-us/documentation/articles/active-directory-v2-protocols-oidc/.

For the photo, you want to look at the User Photo API: https://msdn.microsoft.com/office/office365/APi/photo-rest-operations

分享给朋友:
您可能感兴趣的文章:
随机阅读: