Skip to content

Commit 50076f8

Browse files
committed
PS update for Permissions
1 parent b469c65 commit 50076f8

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

5-WebApp-AuthZ/5-2-Groups/AppCreationScripts/Configure.ps1

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ Function ConfigureApplications
233233
# Add Required Resources Access (from 'webApp' to 'Microsoft Graph')
234234
Write-Host "Getting access from 'webApp' to 'Microsoft Graph'"
235235
$requiredPermissions = GetRequiredPermissions -applicationDisplayName "Microsoft Graph" `
236-
-requiredDelegatedPermissions "GroupMember.Read.All" `
236+
-requiredDelegatedPermissions "User.Read|GroupMember.Read.All" `
237237

238238
$requiredResourcesAccess.Add($requiredPermissions)
239239

@@ -247,6 +247,15 @@ Function ConfigureApplications
247247
$dictionary = @{ "ClientId" = $webAppAadApplication.AppId;"TenantId" = $tenantId;"Domain" = $tenantName;"ClientSecret" = $webAppAppKey };
248248
UpdateTextFile -configFilePath $configFile -dictionary $dictionary
249249

250+
Write-Host ""
251+
Write-Host -ForegroundColor Green "------------------------------------------------------------------------------------------------"
252+
Write-Host "IMPORTANT: Please follow the instructions below to complete a few manual step(s) in the Azure portal":
253+
Write-Host "- For 'webApp'"
254+
Write-Host " - Navigate to '$webAppPortalUrl'"
255+
Write-Host " - Navigate to the API Permissions page and select 'Grant admin consent for (your tenant)'" -ForegroundColor Red
256+
257+
Write-Host -ForegroundColor Green "------------------------------------------------------------------------------------------------"
258+
250259
Add-Content -Value "</tbody></table></body></html>" -Path createdApps.html
251260
}
252261

5-WebApp-AuthZ/5-2-Groups/AppCreationScripts/sample.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@
2525
"RequiredResourcesAccess": [
2626
{
2727
"Resource": "Microsoft Graph",
28-
"DelegatedPermissions": [ "GroupMember.Read.All" ]
28+
"DelegatedPermissions": [ "User.Read", "GroupMember.Read.All" ]
29+
}
30+
],
31+
"ManualSteps": [
32+
{
33+
"Comment": "Navigate to the API Permissions page and select 'Grant admin consent for (your tenant)'"
2934
}
3035
]
3136
}

0 commit comments

Comments
 (0)