Skip to content

Commit

Permalink
fix #37
Browse files Browse the repository at this point in the history
  • Loading branch information
kayasax committed Mar 28, 2024
1 parent 86a6e17 commit b5d57cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion EasyPIM/EasyPIM.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
RootModule = 'EasyPIM.psm1'

# Version number of this module.
ModuleVersion = '1.5.5'
ModuleVersion = '1.5.6'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
10 changes: 9 additions & 1 deletion EasyPIM/internal/functions/Invoke-graph.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,15 @@ function invoke-graph {

if ( $null -eq (get-mgcontext) -or ( (get-mgcontext).TenantId -ne $script:tenantID ) ) {
Write-Verbose ">> Connecting to Azure with tenantID $script:tenantID"
Connect-MgGraph -Tenant $script:tenantID -Scopes RoleManagementPolicy.ReadWrite.Directory, RoleManagement.ReadWrite.Directory, RoleManagementPolicy.ReadWrite.AzureADGroup
$scopes = @(
"RoleManagementPolicy.ReadWrite.Directory",
"RoleManagement.ReadWrite.Directory",
"RoleManagementPolicy.ReadWrite.AzureADGroup",
"PrivilegedEligibilitySchedule.ReadWrite.AzureADGroup",
"PrivilegedAssignmentSchedule.ReadWrite.AzureADGroup",
"PrivilegedAccess.ReadWrite.AzureADGroup")

Connect-MgGraph -Tenant $script:tenantID -Scopes $scopes
}

if ( $body -ne "") {
Expand Down

0 comments on commit b5d57cc

Please sign in to comment.