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
if ($State.permissionGrantPolicyIdsAssignedToDefaultUserRole-notin@('managePermissionGrantsForSelf.cipp-consent-policy')) {
43
-
$Existing= (New-GraphGetRequest-Uri 'https://graph.microsoft.com/beta/policies/permissionGrantPolicies/'-tenantid $tenant) |Where-Object-Property id -EQ'cipp-consent-policy'
44
-
if (!$Existing) {
45
-
New-GraphPostRequest-tenantid $tenant-Uri 'https://graph.microsoft.com/beta/policies/permissionGrantPolicies'-Type POST -Body '{ "id":"cipp-consent-policy", "displayName":"Application Consent Policy", "description":"This policy controls the current application consent policies."}'-ContentType 'application/json'
46
-
#Replaced static web app appid with Office 365 Management by Microsoft's recommendation; this application is always consented, cannot be removed nor elevated as the portals run on this app id.
47
-
New-GraphPostRequest-tenantid $tenant-Uri 'https://graph.microsoft.com/beta/policies/permissionGrantPolicies/cipp-consent-policy/includes'-Type POST -Body '{"permissionClassification":"all","permissionType":"delegated","clientApplicationIds":["00b41c95-dab0-4487-9791-b9d2c32c80f2"]}'-ContentType 'application/json'
42
+
$Existing= (New-GraphGetRequest-Uri 'https://graph.microsoft.com/beta/policies/permissionGrantPolicies/'-tenantid $tenant) |Where-Object-Property id -EQ'cipp-consent-policy'
43
+
if (!$Existing) {
44
+
New-GraphPostRequest-tenantid $tenant-Uri 'https://graph.microsoft.com/beta/policies/permissionGrantPolicies'-Type POST -Body '{ "id":"cipp-consent-policy", "displayName":"Application Consent Policy", "description":"This policy controls the current application consent policies."}'-ContentType 'application/json'
45
+
# Replaced static web app appid with Office 365 Management by Microsoft's recommendation
46
+
New-GraphPostRequest-tenantid $tenant-Uri 'https://graph.microsoft.com/beta/policies/permissionGrantPolicies/cipp-consent-policy/includes'-Type POST -Body '{"permissionClassification":"all","permissionType":"delegated","clientApplicationIds":["00b41c95-dab0-4487-9791-b9d2c32c80f2"]}'-ContentType 'application/json'
0 commit comments