Azure / Azure/Azure-Lighthouse-samples

How to compare authorizations array

Open
#118 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
323
Forks
313
PR merge metrics
No merged PRs in 30d

Description

At present once the policy is deployed, any changes in the authorisations in the parameters will not make the policy non-compliant as the policy rule only checks for managedByTenantId

I can use the Microsoft.ManagedServices/registrationDefinitions/authorizations[*] to compare the length of the existing authorizations with managedByAuthorizations parameter value and Microsoft.ManagedServices/registrationDefinitions/authorizations[*].roleDefinitionId for roleDefinitionIds of the authorizations, however I am not able to use / find aliases to compare all the values in the authorizations array in policy rule
Attached is what works so far.

Is there a way to do that that I am not aware of?

![Screenshot 2021-11-03 at 12 03 47](https://user-images.githubusercontent.com/65300399/140056816-f73f06ba-b69e-449a-9b66-9b3f18da7d2e.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.