編輯

共用方式為


Delete a group setting

Namespace: microsoft.graph

Delete a tenant-level or group-specific groupSetting object.

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 least privileged permissions. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

For tenant-wide settings

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) Directory.ReadWrite.All Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application Directory.ReadWrite.All Not available.

For group-specific settings

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) Group.ReadWrite.All Directory.ReadWrite.All
Delegated (personal Microsoft account) Not supported. Not supported.
Application Group.ReadWrite.All Directory.ReadWrite.All

Important

In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. The following least privileged roles are supported for this operation.

  • Read basic properties on setting templates and settings - Microsoft Entra Joined Device Local Administrator, Directory Readers, Global Reader
  • Manage all group/directory settings - Directory Writers
  • Manage global and local settings for groups; manage Group.Unified.Guest and Group.Unified settings - Groups Administrator
  • Update Password Rule Settings - Authentication Policy Administrator
  • Update settings, Read basic properties on setting templates and settings - User Administrator

HTTP request

Delete a tenant-wide setting.

DELETE /groupSettings/{groupSettingId}

Delete a group-specific setting.

DELETE /groups/{groupId}/settings/{groupSettingId}

Request headers

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

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.

Example

Request

In this example, you delete the tenant-level group setting object.

DELETE https://graph.microsoft.com/v1.0/groupSettings/{id}

Response

HTTP/1.1 204 No Content