Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
merill committed May 23, 2024
2 parents daee3e0 + 2fdc895 commit 72b862d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Export-MsIdAppConsentGrantReport.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
.EXAMPLE
PS > Install-Module ImportExcel
PS > Connect-MgGragh -Scopes Directory.Read.All
PS > Connect-MgGraph -Scopes Directory.Read.All
PS > Export-MsIdAppConsentGrantReport -ReportOutputType ExcelWorkbook -ExcelWorkbookPath .\report.xlsx
Output a report in Excel format
Expand Down
5 changes: 3 additions & 2 deletions src/internal/Test-MgCommandPrerequisites.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function Test-MgCommandPrerequisites {
# The service API version.
[Parameter(Mandatory = $false, Position = 2)]
[ValidateSet('v1.0', 'beta')]
[string] $ApiVersion = 'beta',
[string] $ApiVersion = 'v1.0',
# Specifies a minimum version.
[Parameter(Mandatory = $false)]
[version] $MinimumVersion,
Expand Down Expand Up @@ -47,8 +47,9 @@ function Test-MgCommandPrerequisites {
foreach ($CommandName in $Name) {
[array] $MgCommands = Find-MgGraphCommand -Command $CommandName -ApiVersion $ApiVersion

$MgCommand = $MgCommands[0]

if ($MgCommands.Count -gt 1) {
$MgCommand = $MgCommands[0]
## Resolve from multiple results
[array] $MgCommandsWithPermissions = $MgCommands | Where-Object Permissions -NE $null
[array] $MgCommandsWithListPermissions = $MgCommandsWithPermissions | Where-Object URI -NotLike "*}"
Expand Down

0 comments on commit 72b862d

Please sign in to comment.