Skip to content

Commit d4b630f

Browse files
authored
Merge pull request #97 from BenBagBag/msal-js-documentation-update
Msal js documentation update
2 parents c38220b + 4e66773 commit d4b630f

111 files changed

Lines changed: 546 additions & 564 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1-Authentication/0-sign-in-vanillajs/App/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ciam-sign-in-javascript",
33
"version": "1.0.0",
4-
"description": "Vanilla JavaScript single-page application using MSAL.js to authenticate users against Azure AD Customer Identity Access Management (Azure AD for Customers)",
4+
"description": "Vanilla JavaScript single-page application using MSAL.js to authenticate users against Microsoft Entra External ID",
55
"main": "server.js",
66
"scripts": {
77
"start": "node server.js",

1-Authentication/0-sign-in-vanillajs/App/public/authConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const msalConfig = {
77
auth: {
88
clientId: 'Enter_the_Application_Id_Here', // This is the ONLY mandatory field that you need to supply.
99
authority: 'https://Enter_the_Tenant_Subdomain_Here.ciamlogin.com/', // Replace the placeholder with your tenant subdomain
10-
redirectUri: 'http://localhost:3000/redirect', // You must register this URI on Azure Portal/App Registration. Defaults to window.location.href e.g. http://localhost:3000/
10+
redirectUri: 'http://localhost:3000/redirect', // You must register this URI on Microsoft Entra admin center/App Registration. Defaults to window.location.href e.g. http://localhost:3000/
1111
navigateToLoginRequestUrl: true, // If "true", will navigate back to the original request location before processing the auth code response.
1212
},
1313
cache: {

1-Authentication/0-sign-in-vanillajs/App/public/claimUtils.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const createClaimsTable = (claims) => {
1414
populateClaim(
1515
key,
1616
claims[key],
17-
"Identifies the intended recipient of the token. In ID tokens, the audience is your app's Application ID, assigned to your app in the Azure portal.",
17+
"Identifies the intended recipient of the token. In ID tokens, the audience is your app's Application ID, assigned to your app in the Microsoft Entra admin center.",
1818
index,
1919
claimsObj
2020
);
@@ -24,7 +24,7 @@ const createClaimsTable = (claims) => {
2424
populateClaim(
2525
key,
2626
claims[key],
27-
'Identifies the issuer, or authorization server that constructs and returns the token. It also identifies the Azure AD tenant for which the user was authenticated. If the token was issued by the v2.0 endpoint, the URI will end in /v2.0. The GUID that indicates that the user is a consumer user from a Microsoft account is 9188040d-6c67-4c5b-b112-36a304b66dad.',
27+
'Identifies the issuer, or authorization server that constructs and returns the token. It also identifies the external tenant for which the user was authenticated. If the token was issued by the v2.0 endpoint, the URI will end in /v2.0. The GUID that indicates that the user is a consumer user from a Microsoft account is 9188040d-6c67-4c5b-b112-36a304b66dad.',
2828
index,
2929
claimsObj
3030
);
@@ -94,7 +94,7 @@ const createClaimsTable = (claims) => {
9494
populateClaim(
9595
key,
9696
claims[key],
97-
'The oid (user’s object id) is the only claim that should be used to uniquely identify a user in an Azure AD tenant. The token might have one or more of the following claim, that might seem like a unique identifier, but is not and should not be used as such.',
97+
'The oid (user’s object id) is the only claim that should be used to uniquely identify a user in an external tenant. The token might have one or more of the following claim, that might seem like a unique identifier, but is not and should not be used as such.',
9898
index,
9999
claimsObj
100100
);
@@ -104,7 +104,7 @@ const createClaimsTable = (claims) => {
104104
populateClaim(
105105
key,
106106
claims[key],
107-
'The tenant ID. You will use this claim to ensure that only users from the current Azure AD tenant can access this app.',
107+
'The tenant ID. You will use this claim to ensure that only users from the current external tenant can access this app.',
108108
index,
109109
claimsObj
110110
);

1-Authentication/0-sign-in-vanillajs/App/public/signout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6-
<title>Azure AD | Vanilla JavaScript SPA</title>
6+
<title>Microsoft Entra External ID | Vanilla JavaScript SPA</title>
77
<link rel="SHORTCUT ICON" href="./favicon.svg" type="image/x-icon">
88

99
<!-- adding Bootstrap 4 for UI components -->

1-Authentication/0-sign-in-vanillajs/AppCreationScripts/AppCreationScripts.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@
2828

2929
### Presentation of the scripts
3030

31-
This sample comes with two PowerShell scripts, which automate the creation of the Azure Active Directory applications, and the configuration of the code for this sample. Once you run them, you will only need to build the solution and you are good to test.
31+
This sample comes with two PowerShell scripts, which automate the creation of the Microsoft Entra applications, and the configuration of the code for this sample. Once you run them, you will only need to build the solution and you are good to test.
3232

3333
These scripts are:
3434

3535
- `Configure.ps1` which:
36-
- creates Azure AD applications and their related objects (permissions, dependencies, secrets, app roles),
36+
- creates Microsoft Entra applications and their related objects (permissions, dependencies, secrets, app roles),
3737
- changes the configuration files in the sample projects.
3838
- creates a summary file named `createdApps.html` in the folder from which you ran the script, and containing, for each Azure AD application it created:
3939
- the identifier of the application
4040
- the AppId of the application
41-
- the url of its registration in the [Azure portal](https://portal.azure.com).
41+
- the url of its registration in the [Microsoft Entra admin center](https://entra.microsoft.com/).
4242

4343
- `Cleanup.ps1` which cleans-up the Azure AD objects created by `Configure.ps1`. Note that this script does not revert the changes done in the configuration files, though. You will need to undo the change from source control (from Visual Studio, or from the command line using, for instance, `git reset`).
4444

@@ -108,10 +108,9 @@ Note that the script will choose the tenant in which to create the applications,
108108
109109
if you want to create the apps in a particular tenant, you can use the following option:
110110
111-
- Open the [Azure portal](https://portal.azure.com)
112-
- Select the Azure Active directory you are interested in (in the combo-box below your name on the top right of the browser window)
113-
- Find the "Active Directory" object in this tenant
114-
- Go to **Properties** and copy the content of the **Directory Id** property
111+
- Open the [Microsoft Entra admin center](https://entra.microsoft.com/)
112+
- Select the Microsoft Entra tenant you are interested in (in the combo-box below your name on the top right of the browser window)
113+
- Select **Overview** on the left side menu and then select the **Overview** tab. Copy the content of the **Tenant Id** property
115114
- Then use the full syntax to run the scripts:
116115
117116
```PowerShell

1-Authentication/0-sign-in-vanillajs/AppCreationScripts/Cleanup.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ Function Cleanup
1818

1919
<#
2020
.Description
21-
This function removes the Azure AD applications for the sample. These applications were created by the Configure.ps1 script
21+
This function removes the Microsoft Entra applications for the sample. These applications were created by the Configure.ps1 script
2222
#>
2323

24-
# $tenantId is the Active Directory Tenant. This is a GUID which represents the "Directory ID" of the AzureAD tenant
25-
# into which you want to create the apps. Look it up in the Azure portal in the "Properties" of the Azure AD.
24+
# $tenantId is the Microsoft Entra Tenant. This is a GUID which represents the "Directory ID" of the AzureAD tenant
25+
# into which you want to create the apps. Look it up in the Microsoft Entra admin center in the "Properties" of the Azure AD.
2626

2727
# Connect to the Microsoft Graph API
2828
Write-Host "Connecting to Microsoft Graph"

1-Authentication/0-sign-in-vanillajs/AppCreationScripts/Configure.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ param(
99
)
1010

1111
<#
12-
This script creates the Azure AD applications needed for this sample and updates the configuration files
13-
for the visual Studio projects from the data in the Azure AD applications.
12+
This script creates the Microsoft Entra applications needed for this sample and updates the configuration files
13+
for the visual Studio projects from the data in the Microsoft Entra applications.
1414
1515
In case you don't have Microsoft.Graph.Applications already installed, the script will automatically install it for the current user
1616
@@ -173,7 +173,7 @@ Function CreateOptionalClaim([string] $name)
173173
Function ConfigureApplications
174174
{
175175
<#.Description
176-
This function creates the Azure AD applications for the sample in the provided Azure AD tenant and updates the
176+
This function creates the Microsoft Entra applications for the sample in the provided external tenant and updates the
177177
configuration files in the client and service project of the visual studio solution (App.Config and Web.Config)
178178
so that they are consistent with the Applications parameters
179179
#>
@@ -251,7 +251,7 @@ Function ConfigureApplications
251251
Update-MgApplication -ApplicationId $currentAppObjectId -OptionalClaims $optionalClaims
252252
Write-Host "Done creating the client application (ciam-msal-javascript-spa)"
253253

254-
# URL of the AAD application in the Azure portal
254+
# URL of the AAD application in the Microsoft Entra admin center
255255
# Future? $clientPortalUrl = "https://portal.azure.com/#@"+$tenantName+"/blade/Microsoft_AAD_RegisteredApps/ApplicationMenuBlade/Overview/appId/"+$currentAppId+"/objectId/"+$currentAppObjectId+"/isMSAApp/"
256256
$clientPortalUrl = "https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationMenuBlade/~/Overview/appId/"+$currentAppId+"/isMSAApp~/false"
257257

@@ -289,7 +289,7 @@ Function ConfigureApplications
289289

290290
ReplaceInTextFile -configFilePath $configFile -dictionary $dictionary
291291
Write-Host -ForegroundColor Green "------------------------------------------------------------------------------------------------"
292-
Write-Host "IMPORTANT: Please follow the instructions below to complete a few manual step(s) in the Azure portal":
292+
Write-Host "IMPORTANT: Please follow the instructions below to complete a few manual step(s) in the Microsoft Entra admin center":
293293
Write-Host "- For client"
294294
Write-Host " - Navigate to $clientPortalUrl"
295295
Write-Host " - Navigate to your tenant and create user flows to allow users to sign up for the application." -ForegroundColor Red
@@ -338,7 +338,7 @@ if ($null -eq (Get-Module -ListAvailable -Name "Microsoft.Graph.Users")) {
338338
Import-Module Microsoft.Graph.Users
339339

340340
Set-Content -Value "<html><body><table>" -Path createdApps.html
341-
Add-Content -Value "<thead><tr><th>Application</th><th>AppId</th><th>Url in the Azure portal</th></tr></thead><tbody>" -Path createdApps.html
341+
Add-Content -Value "<thead><tr><th>Application</th><th>AppId</th><th>Url in the Microsoft Entra admin center</th></tr></thead><tbody>" -Path createdApps.html
342342

343343
$ErrorActionPreference = "Stop"
344344

1-Authentication/0-sign-in-vanillajs/AppCreationScripts/apps.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Sample": {
3-
"Title": "A JavaScript single-page application using MSAL Angular to authenticate users against Azure AD for Customers",
3+
"Title": "A JavaScript single-page application using MSAL Angular to authenticate users against Microsoft Entra External ID",
44
"Client": "SinglePageApplication",
55
"Level": 100
66
},

1-Authentication/0-sign-in-vanillajs/AppCreationScripts/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ms.date: 04/19/2023
1414
---
1515
# Portal quickstart for JavaScript SPA
1616

17-
> In this quickstart, you download and run a code sample that demonstrates how a JavaScript SPA that can sign in users with Azure AD for Customers.
17+
> In this quickstart, you download and run a code sample that demonstrates how a JavaScript SPA that can sign in users with Microsoft Entra External ID.
1818
>
1919
> [!div renderon="portal" id="display-on-portal" class="sxs-lookup"]
2020
>

1-Authentication/0-sign-in-vanillajs/AppCreationScripts/sample.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"Sample": {
3-
"Title": "Vanilla JavaScript single-page application using MSAL.js to authenticate users against Customer Identity Access Management (CIAM)",
3+
"Title": "Vanilla JavaScript single-page application using MSAL.js to authenticate users against Microsoft Entra External ID",
44
"Level": 100,
55
"Client": "Vanilla JavaScript SPA",
66
"RepositoryUrl": "ms-identity-ciam-javascript-tutorial",
77
"Endpoint": "AAD v2.0",
88
"Languages": [
99
"javascript"
1010
],
11-
"Description": "Vanilla JavaScript single-page application using MSAL.js to authenticate users against Customer Identity Access Management (CIAM)",
11+
"Description": "Vanilla JavaScript single-page application using MSAL.js to authenticate users against Microsoft Entra External ID",
1212
"Products": [
1313
"azure-active-directory",
1414
"msal-js",

0 commit comments

Comments
 (0)