by XDK
25. October 2019 16:02
Exception:
PS C:\WINDOWS\system32> Get-AzManagementGroup -GroupName XDK_Organisation_Root
Get-AzManagementGroup : The client 'live.com#XXXXXX@XXXXXX.com' with object id '51bf3892'
does not have authorization to perform action 'Microsoft.Management/managementGroups/read' over scope
'/providers/Microsoft.Management/managementGroups/XDK_Organisation_Root' or the scope is invalid. If access was recently
granted, please refresh your credentials.
At line:1 char:1
+ Get-AzManagementGroup -GroupName XDK_Organisation_Root
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzManagementGroup], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Resources.ManagementGroups.GetAzureRmManagementGroup
Solution:
The Global Administrator account in Azure AD might not have access to all subscriptions and management groups in the directory. The solution is to elevate the global administrator account in Azure AD to access all subscriptions and management groups.
Azure portal --> Home --> Azure Active Directory -->Properties --> Select "Yes" --> Save.