php-connect-rest-sample icon indicating copy to clipboard operation
php-connect-rest-sample copied to clipboard

Which OAuth2 grant?

Open andersruneson opened this issue 8 years ago • 1 comments

I've successfully extended this example to read and write user details like this, this and this but when trying to write a profile photo of a user in my organisation like this I get [code] => ErrorAccessDenied [message] => AccessDeniedException

The only clue I have right now is the following note on the page

Note To update the photo of any user in the organization, your app must have the User.ReadWrite.All application permission and call this API under its own identity, not on behalf of a user.

I'm suspecting this has something to do with different types of grants (Client credentials vs Authorization code) but I don't really understand much of this and how this example is set up.

Can you please help me, I'm becoming insane?!

andersruneson avatar Jun 03 '18 10:06 andersruneson

Seems like this cannot be done, see this "Unfortunately the is no plan currently to allow admins to store other user photos in Exchange." I'm really surprised by this!

andersruneson avatar Jun 03 '18 19:06 andersruneson