Query governance policies attached to a Management Group #25857
Labels
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Mgmt
This issue is related to a management-plane library.
needs-author-feedback
Workflow: More information is needed from author to address the issue.
no-recent-activity
There has been no recent activity on this issue.
Policy
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Is your feature request related to a problem? Please describe.
I am trying to list out all the governance policies that are attached to a particular Azure Management Group.
I am using the
@azure/arm-policy
npm module to get the details.The below snippet is a gist of what I am trying to achieve.
I am using the
listForManagementGroup
method which will give me all the governance policies that are attached to a particular management group.The issue that I am facing is, for my use case I don't have access to the
<subscription_id>
and to get the governance policies I need to create aPolicyClient
object which requires<subscription_id>
.Describe the solution you'd like
Is there any other method or any other npm package which I can use to get the governance policies without the usage of
<subscription_id>
at any step?Describe alternatives you've considered
I went through this guide https://learn.microsoft.com/en-us/azure/governance/policy/assign-policy-javascript provided by Azure but I still need to use
<subscription_id>
.Additional context
NodeJs - 18
@azure/arm-policy - 4.2.0
The text was updated successfully, but these errors were encountered: