[Bug]: Management Group not found
Describe the bug Regardless of whether I enter the name of the management group or the ID of the management group, the following message appears:
Error: Management Group name001 not found!
Without parameters, all resources are successfully inventoried.
To Reproduce Invoke-ARI -NoAutoUpdate -TenantID $TenantId -ManagementGroup $ManagementGroup -ReportDir ./$ManagementGroup -DeviceLogin
Expected behavior Logically, inventory is only taken from this management group onwards.
Environment I tried it locally and in a Dev Container. Locally, I am using Windows 11 with PowerShell 7.5.1, and in Dev Container 2025 with lts-7.4-ubuntu-20.04.
Module versions: AzureResourceInventory: 3.6.7 ImportExcel: 7.8.10
Azure cloud special setting Nothing should have any effect, as Inventory works without a management group.
Additional context I tried with the name of the management group and the ID. I haven't tried the resource ID yet, but I wouldn't expect it to work. Unfortunately, I haven't found a proper example, so I can't rule out the possibility that I'm doing something wrong or overlooking something.
Hello @alphasteff
Yep, there is a bug there. Will be fixed in next release 3.6.8
Hi @Claudio-Merola
I now have version 3.6.9, and when I entered the Management Group ID, I got the same error. When I then used the name of the Management Group, no error occurred, but all subscriptions were inventoried. It would now be important to know what should be entered. The Readme.md file says "-ManagementGroup <ID>", but according to my learning, it could be "-ManagementGroup <NAME>". A possible extension would be to specify it as follows:
- -ManagementGroup <NAME>
- -ManagementGroupId <ID>
But why is it still not working? For me, the ID is what is listed in the Azure Portal under Management Groups in the ID column, correct?
Greetings Stefan