3.1.12 Ensure That 'All users with the following roles' is set to 'Owner'

1 votes

# Az PowerShell SDK alternative

$accessToken = (Get-AzAccessToken).Token
$subscriptionId = (Get-AzContext).Subscription.Id

$(Invoke-RestMethod -Uri "https://management.azure.com/subscriptions/$subscriptionId/providers/Microsoft.Security/securityContacts?api-version=2020-01-01-preview" -Method Get -Headers @{Authorization = "Bearer $accessToken"; 'Content-Type' = 'application/json'}).properties.notificationsByRole

Done Benchmark Community Suggestion Suggested by: Filip Jodoin Upvoted: 17 Feb, '25 Comments: 1

Comments: 1
OldestNewestMost likesFewest likes