Delete profilePhoto
Namespace: microsoft.graph
Delete the photo for the signed-in user or the specified group.
Note
The delete operation supports only user or group photos, but not Outlook contact nor Teams photos.
This API is available in the following national cloud deployments.
Global service | US Government L4 | US Government L5 (DOD) | China operated by 21Vianet |
---|---|---|---|
✅ | ✅ | ✅ | ✅ |
Permissions
The following tables show the least privileged permission or permissions required to call this API on each supported resource type. Follow best practices to request the least privileged permissions. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
To delete the profile photo of the signed-in user
Permission type | Least privileged permissions | Higher privileged permissions |
---|---|---|
Delegated (work or school account) | ProfilePhoto.ReadWrite.All | User.ReadWrite, User.ReadWrite.All |
Delegated (personal Microsoft account) | User.ReadWrite | Not supported. |
Application | ProfilePhoto.ReadWrite.All | User.ReadWrite.All |
To delete the profile photo of a group
Permission type | Least privileged permissions | Higher privileged permissions |
---|---|---|
Delegated (work or school account) | ProfilePhoto.ReadWrite.All | Group.ReadWrite.All |
Delegated (personal Microsoft account) | Not supported. | Not supported. |
Application | ProfilePhoto.ReadWrite.All | Group.ReadWrite.All |
Note
- Global and user admins can delete the photo of any user in the organization using delegated permissions. This operation also supports application permissions. Deleting the photo of any user in the organization requires ProfilePhoto.ReadWrite.All or User.ReadWrite.All permissions. Deleting the photo of the signed-in user only requires User.ReadWrite permissions.
HTTP request
To delete a user's profile photo:
DELETE /me/photo/$value
DELETE /users/{id | userPrincipalName}/photo/$value
To delete a group photo:
DELETE /groups/{id}/photo/$value
Request headers
Header | Value |
---|---|
Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Request body
Don't supply a request body for this method.
Response
If successful, this method returns a 200 OK
response code.
Examples
Request
The following example shows a request.
DELETE https://graph.microsoft.com/beta/me/photo/$value
Response
The following example shows the response.
HTTP/1.1 200 OK