简体   繁体   中英

Microsoft Graph REST API profilePhoto as deamon

i try to develop a web-service which displays some user information from an Office 365 instance using the Microsoft Graph.

I'm able to query groups, user details and so on, but i'm not able to get the user profile picture as described here http://graph.microsoft.io/docs/api-reference/v1.0/api/profilephoto_get . It always return a 403, even when my service had all rights (for testing purpose).

The webservice is a deamon as described here: http://graph.microsoft.io/docs/authorization/app_only , so no actual user is logged in. Could that be an issue? Is it possible to query the photo information using a deamon?

As mentioned above, the problem could be solved by two things:

  • Use app permissions istead of delegated
  • If implementation reuses the Auth-Token, restart the apache (or other webserver) running the app after changing permissions for the app. The cached token doesn't seem to get updated rights.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM