Skip to content

Latest commit

 

History

History
147 lines (109 loc) · 4.99 KB

File metadata and controls

147 lines (109 loc) · 4.99 KB
title Delete assignment
description Delete an assignment object.
author patrick-starrin
ms.date 07/18/2025
ms.localizationpriority medium
ms.subservice cloud-licensing
doc_type apiPageType

Delete assignment

Namespace: microsoft.graph.cloudLicensing

[!INCLUDE beta-disclaimer]

Delete an assignment object.

[!INCLUDE national-cloud-support]

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permissions to delete an assignment for an admin:

DELETE /admin/cloudLicensing/assignments/{assignmentId}
DELETE /admin/cloudLicensing/allotments/{allotmentId}/assignments/{assignmentId}

[!INCLUDE permissions-table]

Permissions to delete an assignment for a user:

DELETE /me/cloudLicensing/assignments/{assignmentId}
DELETE /users/{userId}/cloudLicensing/assignments/{assignmentId}

[!INCLUDE permissions-table]

Permissions to delete an assignment for a group:

DELETE /groups/{groupId}/cloudLicensing/assignments/{assignmentId}

[!INCLUDE permissions-table]

HTTP request

To delete an assignment for the signed-in user using delegated (/me) permissions:

DELETE /me/cloudLicensing/assignments/{assignmentId}

To delete an assignment using either delegated or application permissions:

DELETE /admin/cloudLicensing/assignments/{assignmentId}
DELETE /admin/cloudLicensing/allotments/{allotmentId}/assignments/{assignmentId}
DELETE /groups/{groupId}/cloudLicensing/assignments/{assignmentId}
DELETE /users/{userId}/cloudLicensing/assignments/{assignmentId}

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 204 No Content response code.

Examples

Request

The following example shows a request.

DELETE https://graph.microsoft.com/beta/admin/cloudLicensing/assignments/0b1a424d-3b9b-4446-80b9-6917dd521e03

[!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]


Response

The following example shows the response.

HTTP/1.1 204 No Content