Update profilephoto

Namespace: microsoft.graph

Update the photo for the signed-in user, or the specified group or contact. Since there is currently a limit of 4MB on the total size of each REST request, this limits the size of the photo you can add to under 4MB.

You can use either PATCH or PUT for this operation in version 1.0.

Note This operation in version 1.0 supports only a user's work or school mailboxes and not personal mailboxes.


One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

  • Profile photo of the signed-in user - User.ReadWrite, User.ReadWrite.All
  • Profile photo of a group - Group.ReadWrite.All
  • Photo of a contact - Contacts.ReadWrite

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. To learn more, see get access without a signed-in user.

Note: There is currently a known issue with accessing group photos using application permissions.

HTTP request

PATCH /me/photo/$value
PATCH /users/{id | userPrincipalName}/photo/$value
PATCH /groups/{id}/photo/$value
PATCH /me/contacts/{id}/photo/$value
PATCH /users/{id | userPrincipalName}/contacts/{id}/photo/$value
PATCH /me/contactfolders/{contactFolderId}/contacts/{id}/photo/$value
PATCH /users/{id | userPrincipalName}/contactfolders/{contactFolderId}/contacts/{id}/photo/$value

PUT /me/photo/$value
PUT /users/{id | userPrincipalName}/photo/$value
PUT /groups/{id}/photo/$value
PUT /me/contacts/{id}/photo/$value
PUT /users/{id | userPrincipalName}/contacts/{id}/photo/$value
PUT /me/contactfolders/{contactFolderId}/contacts/{id}/photo/$value
PUT /users/{id | userPrincipalName}/contactfolders/{contactFolderId}/contacts/{id}/photo/$value

Request headers

Header Value
Authorization Bearer {token}. Required.
Content-Type image/jpeg. Required.

Request body

In the request body, include the binary data of the photo in the request body.


If successful, this method returns a 200 OK response code.



Here is an example of the request.

PUT https://graph.microsoft.com/v1.0/me/photo/$value
Content-type: image/jpeg

Binary data for the image


Here is an example of the response. Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK