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 an accessReviewPolicy 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
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) |
Policy.ReadWrite.AccessReview |
Not available. |
Delegated (personal Microsoft account) |
Not supported. |
Not supported. |
Application |
Policy.ReadWrite.AccessReview |
Not available. |
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.
- Identity Governance Administrator
- Privileged Role Administrator
HTTP request
PATCH /policies/accessReviewPolicy
PATCH /identityGovernance/accessReviews/policy
Request body
In the request body, supply a JSON representation of the accessReviewPolicy object.
The following table shows the properties that are required when you update the accessReviewPolicy.
Property |
Type |
Description |
isGroupOwnerManagementEnabled |
Boolean |
If true , group owners can create and manage access reviews on groups they own. |
Response
If successful, this method returns a 204 No Content
response code.
Examples
Request
PATCH https://graph.microsoft.com/beta/policies/accessReviewPolicy
Content-Type: application/json
{
"isGroupOwnerManagementEnabled": true
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new AccessReviewPolicy
{
IsGroupOwnerManagementEnabled = true,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Policies.AccessReviewPolicy.PatchAsync(requestBody);
mgc-beta policies access-review-policy patch --body '{\
"isGroupOwnerManagementEnabled": true\
}\
'
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewAccessReviewPolicy()
isGroupOwnerManagementEnabled := true
requestBody.SetIsGroupOwnerManagementEnabled(&isGroupOwnerManagementEnabled)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
accessReviewPolicy, err := graphClient.Policies().AccessReviewPolicy().Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
AccessReviewPolicy accessReviewPolicy = new AccessReviewPolicy();
accessReviewPolicy.setIsGroupOwnerManagementEnabled(true);
AccessReviewPolicy result = graphClient.policies().accessReviewPolicy().patch(accessReviewPolicy);
const options = {
authProvider,
};
const client = Client.init(options);
const accessReviewPolicy = {
isGroupOwnerManagementEnabled: true
};
await client.api('/policies/accessReviewPolicy')
.version('beta')
.update(accessReviewPolicy);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\AccessReviewPolicy;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new AccessReviewPolicy();
$requestBody->setIsGroupOwnerManagementEnabled(true);
$result = $graphServiceClient->policies()->accessReviewPolicy()->patch($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Identity.SignIns
$params = @{
isGroupOwnerManagementEnabled = $true
}
Update-MgBetaPolicyAccessReviewPolicy -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.access_review_policy import AccessReviewPolicy
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = AccessReviewPolicy(
is_group_owner_management_enabled = True,
)
result = await graph_client.policies.access_review_policy.patch(request_body)
Response
HTTP/1.1 204 No Content
Request
PATCH https://graph.microsoft.com/beta/identityGovernance/accessReviews/policy
Content-Type: application/json
{
"isGroupOwnerManagementEnabled": true
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new AccessReviewPolicy
{
IsGroupOwnerManagementEnabled = true,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.IdentityGovernance.AccessReviews.Policy.PatchAsync(requestBody);
mgc-beta identity-governance access-reviews policy patch --body '{\
"isGroupOwnerManagementEnabled": true\
}\
'
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewAccessReviewPolicy()
isGroupOwnerManagementEnabled := true
requestBody.SetIsGroupOwnerManagementEnabled(&isGroupOwnerManagementEnabled)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
policy, err := graphClient.IdentityGovernance().AccessReviews().Policy().Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
AccessReviewPolicy accessReviewPolicy = new AccessReviewPolicy();
accessReviewPolicy.setIsGroupOwnerManagementEnabled(true);
AccessReviewPolicy result = graphClient.identityGovernance().accessReviews().policy().patch(accessReviewPolicy);
const options = {
authProvider,
};
const client = Client.init(options);
const accessReviewPolicy = {
isGroupOwnerManagementEnabled: true
};
await client.api('/identityGovernance/accessReviews/policy')
.version('beta')
.update(accessReviewPolicy);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\AccessReviewPolicy;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new AccessReviewPolicy();
$requestBody->setIsGroupOwnerManagementEnabled(true);
$result = $graphServiceClient->identityGovernance()->accessReviews()->policy()->patch($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Identity.Governance
$params = @{
isGroupOwnerManagementEnabled = $true
}
Update-MgBetaIdentityGovernanceAccessReviewPolicy -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.access_review_policy import AccessReviewPolicy
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = AccessReviewPolicy(
is_group_owner_management_enabled = True,
)
result = await graph_client.identity_governance.access_reviews.policy.patch(request_body)
Response
HTTP/1.1 204 No Content