Skip to content

Commit 5419ca0

Browse files
committed
add screenshots
1 parent d081a21 commit 5419ca0

File tree

11 files changed

+522
-402
lines changed

11 files changed

+522
-402
lines changed

2-Authorization-I/1-call-graph/Readme-incremental.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ As a first step you'll need to:
8585
1. Sign in to the [Azure portal](https://portal.azure.com).
8686
1. If your account is present in more than one Azure AD tenant, select your profile at the top right corner in the menu on top of the page, and then **switch directory** to change your portal session to the desired Azure AD tenant.
8787

88-
### Register the app (msal-angular-spa)
88+
### Update the app registration (msal-angular-spa)
8989

9090
1. Navigate to the [Azure portal](https://portal.azure.com) and select the **Azure AD** service.
9191
1. Select the **App Registrations** blade on the left, then find and select the application that you have registered in the previous tutorial (`msal-angular-spa`).

3-Authorization-II/1-call-api/AppCreationScripts/Cleanup.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ Function Cleanup
5959
# Removes the applications
6060
Write-Host "Cleaning-up applications from tenant '$tenantName'"
6161

62-
Write-Host "Removing 'service' (msal-angular-api) if needed"
63-
Get-AzureADApplication -Filter "DisplayName eq 'msal-angular-api'" | ForEach-Object {Remove-AzureADApplication -ObjectId $_.ObjectId }
64-
$apps = Get-AzureADApplication -Filter "DisplayName eq 'msal-angular-api'"
62+
Write-Host "Removing 'service' (msal-dotnet-api) if needed"
63+
Get-AzureADApplication -Filter "DisplayName eq 'msal-dotnet-api'" | ForEach-Object {Remove-AzureADApplication -ObjectId $_.ObjectId }
64+
$apps = Get-AzureADApplication -Filter "DisplayName eq 'msal-dotnet-api'"
6565
if ($apps)
6666
{
6767
Remove-AzureADApplication -ObjectId $apps.ObjectId
@@ -70,10 +70,10 @@ Function Cleanup
7070
foreach ($app in $apps)
7171
{
7272
Remove-AzureADApplication -ObjectId $app.ObjectId
73-
Write-Host "Removed msal-angular-api.."
73+
Write-Host "Removed msal-dotnet-api.."
7474
}
7575
# also remove service principals of this app
76-
Get-AzureADServicePrincipal -filter "DisplayName eq 'msal-angular-api'" | ForEach-Object {Remove-AzureADServicePrincipal -ObjectId $_.Id -Confirm:$false}
76+
Get-AzureADServicePrincipal -filter "DisplayName eq 'msal-dotnet-api'" | ForEach-Object {Remove-AzureADServicePrincipal -ObjectId $_.Id -Confirm:$false}
7777

7878
Write-Host "Removing 'client' (msal-angular-spa) if needed"
7979
Get-AzureADApplication -Filter "DisplayName eq 'msal-angular-spa'" | ForEach-Object {Remove-AzureADApplication -ObjectId $_.ObjectId }

3-Authorization-II/1-call-api/AppCreationScripts/Configure.ps1

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,10 @@ Function ConfigureApplications
197197
$user = Get-AzureADUser -ObjectId $creds.Account.Id
198198

199199
# Create the service AAD application
200-
Write-Host "Creating the AAD application (msal-angular-api)"
200+
Write-Host "Creating the AAD application (msal-dotnet-api)"
201201
# create the application
202-
$serviceAadApplication = New-AzureADApplication -DisplayName "msal-angular-api" `
203-
-HomePage "https://localhost:44351/api/todolist/" `
202+
$serviceAadApplication = New-AzureADApplication -DisplayName "msal-dotnet-api" `
203+
-HomePage "https://localhost:44351/api/todolist" `
204204
-PublicClient $False
205205

206206
$serviceIdentifierUri = 'api://'+$serviceAadApplication.AppId
@@ -238,9 +238,9 @@ Function ConfigureApplications
238238
if ($scopes.Count -ge 0)
239239
{
240240
$scope = CreateScope -value access_as_user `
241-
-userConsentDisplayName "Access msal-angular-api" `
242-
-userConsentDescription "Allow the application to access msal-angular-api on your behalf." `
243-
-adminConsentDisplayName "Access msal-angular-api" `
241+
-userConsentDisplayName "Access msal-dotnet-api" `
242+
-userConsentDescription "Allow the application to access msal-dotnet-api on your behalf." `
243+
-adminConsentDisplayName "Access msal-dotnet-api" `
244244
-adminConsentDescription "Allows the app to have the same access to information in the directory on behalf of the signed-in user."
245245

246246
$scopes.Add($scope)
@@ -250,12 +250,12 @@ Function ConfigureApplications
250250
# add/update scopes
251251
Set-AzureADApplication -ObjectId $serviceAadApplication.ObjectId -OAuth2Permission $scopes
252252

253-
Write-Host "Done creating the service application (msal-angular-api)"
253+
Write-Host "Done creating the service application (msal-dotnet-api)"
254254

255255
# URL of the AAD application in the Azure portal
256256
# Future? $servicePortalUrl = "https://portal.azure.com/#@"+$tenantName+"/blade/Microsoft_AAD_RegisteredApps/ApplicationMenuBlade/Overview/appId/"+$serviceAadApplication.AppId+"/objectId/"+$serviceAadApplication.ObjectId+"/isMSAApp/"
257257
$servicePortalUrl = "https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationMenuBlade/CallAnAPI/appId/"+$serviceAadApplication.AppId+"/objectId/"+$serviceAadApplication.ObjectId+"/isMSAApp/"
258-
Add-Content -Value "<tr><td>service</td><td>$currentAppId</td><td><a href='$servicePortalUrl'>msal-angular-api</a></td></tr>" -Path createdApps.html
258+
Add-Content -Value "<tr><td>service</td><td>$currentAppId</td><td><a href='$servicePortalUrl'>msal-dotnet-api</a></td></tr>" -Path createdApps.html
259259

260260

261261
# Create the client AAD application
@@ -291,7 +291,7 @@ Function ConfigureApplications
291291

292292
# Add Required Resources Access (from 'client' to 'service')
293293
Write-Host "Getting access from 'client' to 'service'"
294-
$requiredPermissions = GetRequiredPermissions -applicationDisplayName "msal-angular-api" `
294+
$requiredPermissions = GetRequiredPermissions -applicationDisplayName "msal-dotnet-api" `
295295
-requiredDelegatedPermissions "access_as_user" `
296296

297297
$requiredResourcesAccess.Add($requiredPermissions)

0 commit comments

Comments
 (0)