| title | Delete profilePhoto |
|---|---|
| description | Delete the photo for the signed-in user or the specified group. |
| ms.localizationpriority | medium |
| author | kristinmcleod |
| ms.subservice | people |
| doc_type | apiPageType |
| ms.date | 08/08/2024 |
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.
[!INCLUDE national-cloud-support]
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 least privileged permissions. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
| 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 |
| 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 admins, User admins, and People 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.
To delete a user's profile photo:
DELETE /me/photo/$value
DELETE /users/{id | userPrincipalName}/photo/$valueTo delete a group photo:
DELETE /groups/{id}/photo/$value| Header | Value |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Don't supply a request body for this method.
If successful, this method returns a 200 OK response code.
The following example shows a request.
DELETE https://graph.microsoft.com/v1.0/me/photo/$value[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
HTTP/1.1 200 OK