HI @Najam ul Saqib,
You can list the roles/permissions assigned to the managed identity using the Get-AzRoleAssignment cmdlet.
Step 1: Get the Object ID of the system-assigned managed identity
$automationAccount = Get-AzAutomationAccount -ResourceGroupName "<RG-Name>" -Name "<AutomationAccount-Name>" $miPrincipalId = $automationAccount.Identity.PrincipalId
Artifacts below: -
Note: Principal Id is the Object ID of the managed identity in Azure AD.
Step 2: List role assignments for the managed identity
Get-AzRoleAssignment -ObjectId $miPrincipalId
This will show all the role assignments and the scopes (e.g., subscription, resource group, specific resource) where they are applied.
Please let me know if you face any challenge here, I can help you to resolve this issue further
Provide your valuable Comments.
Please do not forget to "Accept the answer” and “upvote it” wherever the information provided helps you, this can be beneficial to other community members.it would be greatly appreciated and helpful to others.