Forum Discussion
notepadapp
Jul 16, 2024Copper Contributor
Graph - Access Review
I've been trying to modify my create access review script to include an email address to the NotificationRecipientScope. Need to specify at end of review, send notification to email address removed f...
sdtslmn
Jul 16, 2024Brass Contributor
maybe the following can help you
$notifRecipients = @(
@{
notificationTemplateType = "CompletedAdditionalRecipients"
recipients = @(
@{
"@odata.type" = "#microsoft.graph.accessReviewNotificationRecipientScope"
notificationRecipients = @(
@{
"@odata.type" = "#microsoft.graph.user"
emailAddress = "email address removed for privacy reasons"
}
)
}
)
}
)
# Example Access Review Creation
New-AzureADMSAccessReview -ReviewId <ReviewId> -Settings @{
autoApplyDecisionsEnabled = $false
instanceDurationInDays = 30
mailNotificationsEnabled = $true
recurrenceSettings = @{
pattern = @{ type = "weekly"; interval = 1 }
range = @{ type = "endDate"; endDate = "2024-12-31T23:59:59Z" }
}
reviewers = @(
@{ "@odata.type" = "#microsoft.graph.userSet"; id = "<UserId>" }
)
additionalNotificationRecipients = $notifRecipients
}
notepadapp
Jul 16, 2024Copper Contributor
Thanks for your help, unfortunately I get error 400 - bad request.