简体   繁体   中英

Update another user's photo using graph api / office api

i have a problem when trying to update another user photo either by using

graph api : "graph.microsoft.com/v1.0/Users/usermail/photo/$value" or Outlook REST API:"outlook.office.com/api/v2.0/users('usermail')/photo/$value" or Microsoft Graph SDK : "github.com/microsoftgraph"

the API returns a 403 error (forbidden) even though the App I'm using has full permissions to the Graph API.

Microsoft Graph Sdk returns when trying to set another user photo "ErrorAccessDenied Message: Access is denied. Check credentials and try again."

i can only update picture of signed in user if i use user mail & password to get valid access token

if i get the valid access token using client id and secret key i can't update any user photo

so can i update another user photo using graph api ? am i missing any permission required for the app?

If you are signed in as a user, meaning the user signed in and consented to allow the app to act on their behalf, you cannot update other users' photos. In order to do that, you would need to login with the client credentials auth flow , and an organizational admin would have to grant access to your app.

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