You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Modules/CIPPCore/Public/GraphHelper/Get-NormalizedError.ps1
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,7 @@ function Get-NormalizedError {
73
73
'*AADSTS9002313*' { 'The credentials used to connect to the Graph API are not available, please retry. If this issue persists you may need to execute the SAM wizard.' }
74
74
'*One or more platform(s) is/are not configured for the customer. Please configure the platform before trying to purchase a SKU.*' { 'One or more platform(s) is/are not configured for the customer. Please configure the platform before trying to purchase a SKU.' }
75
75
"One or more added object references already exist for the following modified properties: 'members'." { 'This user is already a member of the selected group.' }
76
+
'*is not present in the role definition of the current user*' { 'We do not have permissions to access this resource, try performing a CPV refresh in Application Settings -> Permissions. ' }
if (($SAMRoles|Measure-Object).count-gt0-and$Tenants-contains$TenantFilter-or$Tenants-contains'AllTenants') {
47
+
if (($SAMRoles|Measure-Object).Count-gt0-and($Tenants-contains$TenantFilter-or$Tenants-contains'AllTenants'-or ($Tenants|Measure-Object).Count -eq0)) {
35
48
$InitialRequests=@(
36
49
[PSCustomObject]@{
37
50
id='memberOf'
@@ -83,8 +96,10 @@ function Set-CIPPSAMAdminRoles {
83
96
$Results|ForEach-Object {
84
97
if ($_.status-eq204) {
85
98
$ActionLogs.Add("Added service principal to directory role $($_.id)")
99
+
} elseif ($_.status-eq404) {
100
+
$ActionLogs.Add("Directory role $($_.id) does not exist in tenant, skipping")
86
101
} else {
87
-
$ActionLogs.Add("Failed to add service principal to directoryRole $($_.id)")
102
+
$ActionLogs.Add("Failed to add service principal to directoryRole $($_.id): $($_|ConvertTo-Json-Depth 5)")
0 commit comments