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.
Permission type
Least privileged permissions
Higher privileged permissions
Delegated (work or school account)
AppRoleAssignment.ReadWrite.All
Not available.
Delegated (personal Microsoft account)
Not supported.
Not supported.
Application
AppRoleAssignment.ReadWrite.All
Not available.
HTTP request
DELETE /groups/{id}/appRoleAssignments/{id}
Note
As a best practice, we recommend you delete app role assignments using the Delete appRoleAssignedTo method which deletes through the appRoleAssignedTo relationship of the resource service principal, instead of this method.
Request headers
Name
Description
Authorization
Bearer {token}. Required.
Request body
Don't supply a request body for this method.
Response
If successful, this method returns 204 No Content response code. It doesn't return anything in the response body.
Examples
Request
Here is an example of the request to delete an app role assignment.
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Groups["{group-id}"].AppRoleAssignments["{appRoleAssignment-id}"].DeleteAsync();
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc groups app-role-assignments delete --group-id {group-id} --app-role-assignment-id {appRoleAssignment-id}
<?php
// THIS SNIPPET IS A PREVIEW VERSION OF THE SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$graphServiceClient->groups()->byGroupId('group-id')->appRoleAssignments()->byAppRoleAssignmentId('appRoleAssignment-id')->delete()->wait();
# THE PYTHON SDK IS IN PREVIEW. FOR NON-PRODUCTION USE ONLY
graph_client = GraphServiceClient(credentials, scopes)
await graph_client.groups.by_group_id('group-id').app_role_assignments.by_app_role_assignment_id('appRoleAssignment-id').delete()