Update authorizationPolicy

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Update the properties of a authorizationPolicy object.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) Policy.ReadWrite.Authorization
Delegated (personal Microsoft account) Not supported.
Application Policy.ReadWrite.Authorization

HTTP request

PATCH /policies/authorizationPolicy/authorizationPolicy

Request headers

Name Description
Authorization Bearer {token}
Content-type application/json

Request body

In the request body, supply the values for relevant fields that should be updated. Existing properties that are not included in the request body will maintain their previous values or be recalculated based on changes to other property values. For best performance, don't include existing values that haven't changed.

Property Type Description
displayName String Display name for this policy.
description String Description of this policy.
guestUserRoleId Guid Represents role templateId for the role that should be granted to guest user. Refer to List unifiedRoleDefinitions to find the list of available role templates. Only supported roles today are User (a0b1b346-4d3e-4e8b-98f8-753987be4970), Guest User (10dae51f-b6af-4016-8d66-8c2a99b929b3), and Restricted Guest User (2af84b1e-32c8-42b7-82bc-daa82404023b).
enabledPreviewFeatures Collection(string) List of features enabled for private preview on the tenant.
blockMsolPowerShell Boolean To disable the use of MSOL PowerShell, set this property to true. This will also disable user-based access to the legacy service endpoint used by MSOL PowerShell. This does not affect Azure AD Connect or Microsoft Graph.
defaultUserRolePermissions defaultUserRolePermissions Specifies certain customizable permissions for default user role.
allowedToUseSSPR Boolean Indicates whether the Self-Serve Password Reset feature can be used by users on the tenant.
allowedToSignUpEmailBasedSubscriptions Boolean Indicates whether users can sign up for email based subscriptions.
allowEmailVerifiedUsersToJoinOrganization Boolean Indicates whether a user can join the tenant by email validation.
permissionGrantPolicyIdsAssignedToDefaultUserRole String collection Indicates whether user consent to apps is allowed, and if it is, which app consent policy governs the permission for users to grant consent. Values should be in the format managePermissionGrantsForSelf.{id}, where {id} is the id of a built-in or custom app consent policy. An empty list indicates user consent to apps is disabled.

Response

If successful, this method returns a 204 No Content response code. It does not return anything in the response body.

Examples

Example 1: Update or set Guest user access level for the tenant

Request

The following is an example of the request. In this example, guest access level is modified to Restricted Guest User.

PATCH https://graph.microsoft.com/beta/policies/authorizationPolicy/authorizationPolicy

{
   "guestUserRole":"2af84b1e-32c8-42b7-82bc-daa82404023b"
}

Response

The following is an example of the response.

HTTP/1.1 204 No Content

Example 2: Enable new feature for preview on tenant

Request

The following is an example of the request.

PATCH https://graph.microsoft.com/beta/policies/authorizationPolicy/authorizationPolicy

{
   "enabledPreviewFeatures":[
      "assignGroupsToRoles"
   ]
}

Response

The following is an example of the response.

HTTP/1.1 204 No Content

Example 3: Block MSOL PowerShell in tenant

Request

The following is an example of the request.

PATCH https://graph.microsoft.com/beta/policies/authorizationPolicy/authorizationPolicy

{
   "blockMsolPowerShell":true
}

Response

The following is an example of the response.

HTTP/1.1 204 No Content

Example 4: Disable default user role's permission to create applications

Request

The following is an example of the request.

PATCH https://graph.microsoft.com/beta/policies/authorizationPolicy/authorizationPolicy

{
   "defaultUserRolePermissions":{
      "allowedToCreateApps":false
   }
}

Response

The following is an example of the response.

HTTP/1.1 204 No Content

Example 5: Enable default user role to use Self-Serve Password Reset feature

Request

The following is an example of the request.

PATCH https://graph.microsoft.com/beta/policies/authorizationPolicy/authorizationPolicy

{
   "allowedToUseSSPR":true
}

Response

The following is an example of the response.

HTTP/1.1 204 No Content

Request

The following is an example of the request.

PATCH https://graph.microsoft.com/beta/policies/authorizationPolicy/authorizationPolicy

{
   "permissionGrantPolicyIdsAssignedToDefaultUserRole":[
   
   ]
}

Response

The following is an example of the response.

HTTP/1.1 204 No Content

Request

The following is an example of the request that allows user consent to apps, subject to the built-in app consent policy microsoft-user-default-low, which allows delegated permissions classified "low", for client apps from verified publishers or registered in the same tenant.

PATCH https://graph.microsoft.com/beta/policies/authorizationPolicy/authorizationPolicy

{
   "permissionGrantPolicyIdsAssignedToDefaultUserRole":[
      "managePermissionGrantsForSelf.microsoft-user-default-low"
   ]
}

Response

The following is an example of the response.

HTTP/1.1 204 No Content