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 accessReviewInstance object. Only the reviewers and fallbackReviewers properties can be updated but the scope property is also required in the request body. You can only add reviewers to the fallbackReviewers property but can't remove existing fallbackReviewers.
To update an accessReviewInstance, it's status must be InProgress.
Note
Updating an accessReviewInstance will update only that instance. The parent accessReviewScheduleDefinition and any future accessReviewInstance objects won't change. To make updates that apply to all future instances, update the parent accessReviewScheduleDefinition 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)
AccessReview.ReadWrite.All
Delegated (personal Microsoft account)
Not supported.
Application
AccessReview.ReadWrite.All
HTTP request
PUT /identityGovernance/accessReviews/definitions/{accessReviewScheduleDefinitionId}/instances/{accessReviewInstanceId}
Request headers
Name
Description
Authorization
Bearer {token}. Required.
Content-Type
application/json. Required.
Request body
In the request body, supply only the values for properties 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.
The following table specifies the properties that can be updated.
This collection of reviewer scopes is used to define the list of fallback reviewers. These fallback reviewers will be notified to take action if no users are found from the list of reviewers specified. This could occur when either the group owner is specified as the reviewer but the group owner does not exist, or manager is specified as reviewer but a user's manager does not exist. Optional. Updatable.
Created based on scope and instanceEnumerationScope at the accessReviewScheduleDefinition level. Defines the scope of users reviewed in a group. Read-only. Required but not updated.
Response
If successful, this method returns a 200 OK response code and an updated accessReviewInstance object in the response body.
Attempting to remove existing fallbackReviewers returns a 409 Conflict response code.
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var accessReviewInstance = new AccessReviewInstance
{
Scope = new PrincipalResourceMembershipsScope
{
PrincipalScopes = new List<AccessReviewScope>()
{
new AccessReviewQueryScope
{
Query = "/v1.0/users",
QueryType = "MicrosoftGraph"
},
new AccessReviewQueryScope
{
Query = "/v1.0/groups",
QueryType = "MicrosoftGraph"
}
},
ResourceScopes = new List<AccessReviewScope>()
{
new AccessReviewQueryScope
{
Query = "/beta/roleManagement/directory/roleDefinitions/9b895d92-2cd3-44c7-9d02-a6ac2d5ea5c3",
QueryType = "MicrosoftGraph"
}
}
},
Reviewers = new List<AccessReviewReviewerScope>()
{
new AccessReviewReviewerScope
{
Query = "/users/1ed8ac56-4827-4733-8f80-86adc2e67db5",
QueryType = "MicrosoftGraph"
}
},
FallbackReviewers = new List<AccessReviewReviewerScope>()
{
new AccessReviewReviewerScope
{
Query = "/users/4562bcc8-c436-4f95-b7c0-4f8ce89dca5e",
QueryType = "MicrosoftGraph"
},
new AccessReviewReviewerScope
{
Query = "/users/1ed8ac56-4827-4733-8f80-86adc2e67db5",
QueryType = "MicrosoftGraph"
}
}
};
await graphClient.IdentityGovernance.AccessReviews.Definitions["{accessReviewScheduleDefinition-id}"].Instances["{accessReviewInstance-id}"]
.Request()
.UpdateAsync(accessReviewInstance);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new AccessReviewInstance();
$scope = new AccessReviewScope();
$scope->set@odatatype('#microsoft.graph.principalResourceMembershipsScope');
$additionalData = [
'principalScopes' => $principalScopes1 = new ();
$ principalScopes1->set@odatatype('#microsoft.graph.accessReviewQueryScope');
$ principalScopes1->setQuery('/v1.0/users');
$ principalScopes1->setQueryType('MicrosoftGraph');
$principalScopesArray []= $principalScopes1;
$principalScopes2 = new ();
$ principalScopes2->set@odatatype('#microsoft.graph.accessReviewQueryScope');
$ principalScopes2->setQuery('/v1.0/groups');
$ principalScopes2->setQueryType('MicrosoftGraph');
$principalScopesArray []= $principalScopes2;
$scope->setPrincipalScopes($principalScopesArray);
'resourceScopes' => $resourceScopes1 = new ();
$ resourceScopes1->set@odatatype('#microsoft.graph.accessReviewQueryScope');
$ resourceScopes1->setQuery('/beta/roleManagement/directory/roleDefinitions/9b895d92-2cd3-44c7-9d02-a6ac2d5ea5c3');
$ resourceScopes1->setQueryType('MicrosoftGraph');
$resourceScopesArray []= $resourceScopes1;
$scope->setResourceScopes($resourceScopesArray);
];
$scope->setAdditionalData($additionalData);
$requestBody->setScope($scope);
$reviewersAccessReviewReviewerScope1 = new AccessReviewReviewerScope();
$reviewersAccessReviewReviewerScope1->setQuery('/users/1ed8ac56-4827-4733-8f80-86adc2e67db5');
$reviewersAccessReviewReviewerScope1->setQueryType('MicrosoftGraph');
$reviewersArray []= $reviewersAccessReviewReviewerScope1;
$requestBody->setReviewers($reviewersArray);
$fallbackReviewersAccessReviewReviewerScope1 = new AccessReviewReviewerScope();
$fallbackReviewersAccessReviewReviewerScope1->setQuery('/users/4562bcc8-c436-4f95-b7c0-4f8ce89dca5e');
$fallbackReviewersAccessReviewReviewerScope1->setQueryType('MicrosoftGraph');
$fallbackReviewersArray []= $fallbackReviewersAccessReviewReviewerScope1;
$fallbackReviewersAccessReviewReviewerScope2 = new AccessReviewReviewerScope();
$fallbackReviewersAccessReviewReviewerScope2->setQuery('/users/1ed8ac56-4827-4733-8f80-86adc2e67db5');
$fallbackReviewersAccessReviewReviewerScope2->setQueryType('MicrosoftGraph');
$fallbackReviewersArray []= $fallbackReviewersAccessReviewReviewerScope2;
$requestBody->setFallbackReviewers($fallbackReviewersArray);
$graphServiceClient->identityGovernance()->accessReviews()->definitionsById('accessReviewScheduleDefinition-id')->instancesById('accessReviewInstance-id')->patch($requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.