ThomasKur / M365Documentation

Automatic Microsoft 365 Documentation to simplify the life of admins and consultants.
Other
300 stars 45 forks source link

Get-GroupInfo - Cannot bind argument - Issue #48

Open SveinungK opened 3 months ago

SveinungK commented 3 months ago

Hello, When I attempt to run the report I recieve an error for Get-GroupInfo.

This is the following error:

Get-GroupInfo : Cannot bind argument to parameter 'Groups' because it is null.                                         
At C:\Program Files\WindowsPowerShell\Modules\M365Documentation\3.3.0\Internal\Collector\Intune\Get-MobileApp.ps1:53    char:50                                                                                                                 
+         $DocSec2.Objects = Get-GroupInfo -Groups $AppGroups                                                           
+                                                    ~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Get-GroupInfo], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-GroupInfo

I hope there is an easy fix for this issue.

The command used when receving the error was: $doc = Get-M365Doc -Components Intune -IncludeSections MobileApp

SveinungK commented 3 months ago

I believe this issue is relevant to the report. I'm spesficly after the App Assignments in my enviornment, but the result is not correct. There is multiple groups assigned on some apps, so when I checked there was only one group listed in the .csv