Skip to content

Commit 2b884d5

Browse files
authored
Merge pull request #46 from Azure-Samples/update-tenant-domain-name
Updated tenant name to subdomain
2 parents 3e5d73e + 3c373e2 commit 2b884d5

60 files changed

Lines changed: 111 additions & 117 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/public/authConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
const msalConfig = {
77
auth: {
88
clientId: 'Enter_the_Application_Id_Here', // This is the ONLY mandatory field that you need to supply.
9-
authority: 'https://Enter_the_Tenant_Name_Here.ciamlogin.com/', // Replace "Enter_the_Tenant_Name_Here" with your tenant name
9+
authority: 'https://Enter_the_Tenant_Subdomain_Here.ciamlogin.com/', // Replace "Enter_the_Tenant_Subdomain_Here" with your tenant subdomain
1010
redirectUri: '/', // You must register this URI on Azure Portal/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
},

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ Function ConfigureApplications
281281
# $configFile = $pwd.Path + "\..\App\public\authConfig.js"
282282
$configFile = $(Resolve-Path ($pwd.Path + "\..\App\public\authConfig.js"))
283283

284-
$dictionary = @{ "Enter_the_Application_Id_Here" = $clientAadApplication.AppId;"Enter_the_Tenant_Name_Here" = $tenantName.Split(".onmicrosoft.com")[0] };
284+
$dictionary = @{ "Enter_the_Application_Id_Here" = $clientAadApplication.AppId; "Enter_the_Tenant_Subdomain_Here" = $tenantName.Split(".onmicrosoft.com")[0] };
285285

286286
Write-Host "Updating the sample config '$configFile' with the following config values:" -ForegroundColor Yellow
287287
$dictionary

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"settingFile": "/App/public/authConfig.js",
4343
"replaceTokens": {
4444
"appId": "Enter_the_Application_Id_Here",
45-
"tenantName": "Enter_the_Tenant_Name_Here"
45+
"tenantName": "Enter_the_Tenant_Subdomain_Here"
4646
}
4747
}
4848
]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"value": ".AppId"
6060
},
6161
{
62-
"key": "Enter_the_Tenant_Name_Here",
62+
"key": "Enter_the_Tenant_Subdomain_Here",
6363
"value": "$tenantName"
6464
}
6565
]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Open the project in your IDE (like Visual Studio or Visual Studio Code) to confi
163163
164164
1. Open the `App\public\authConfig.js` file.
165165
1. Find the key `Enter_the_Application_Id_Here` and replace the existing value with the application ID (clientId) of `ciam-msal-javascript-spa` app copied from the Azure portal.
166-
1. Find the key `Enter_the_Tenant_Name_Here` and replace the existing value with the name of your Azure AD CIAM tenant.
166+
1. Find the placeholder `Enter_the_Tenant_Subdomain_Here` and replace it with the Directory (tenant) subdomain. For instance, if your tenant primary domain is `contoso.onmicrosoft.com`, use `contoso`. If you don't have your tenant domain name, learn how to [read your tenant details](https://review.learn.microsoft.com/azure/active-directory/external-identities/customers/how-to-create-customer-tenant-portal#get-the-customer-tenant-details).
167167
168168
### Step 4: Running the sample
169169

1-Authentication/1-sign-in-react/AppCreationScripts/Configure.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ Function ConfigureApplications
251251
# $configFile = $pwd.Path + "\..\SPA\src\authConfig.js"
252252
$configFile = $(Resolve-Path ($pwd.Path + "\..\SPA\src\authConfig.js"))
253253

254-
$dictionary = @{ "Enter_the_Application_Id_Here" = $clientAadApplication.AppId;"Enter_the_Tenant_Name_Here" = $tenantName.Split(".onmicrosoft.com")[0] };
254+
$dictionary = @{ "Enter_the_Application_Id_Here" = $clientAadApplication.AppId; "Enter_the_Tenant_Subdomain_Here" = $tenantName.Split(".onmicrosoft.com")[0] };
255255

256256
Write-Host "Updating the sample config '$configFile' with the following config values:" -ForegroundColor Yellow
257257
$dictionary

1-Authentication/1-sign-in-react/AppCreationScripts/apps.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"settingFile": "/SPA/src/authConfig.js",
4343
"replaceTokens": {
4444
"appId": "Enter_the_Application_Id_Here",
45-
"tenantName": "Enter_the_Tenant_Name_Here"
45+
"tenantName": "Enter_the_Tenant_Subdomain_Here"
4646
}
4747
}
4848
]

1-Authentication/1-sign-in-react/AppCreationScripts/sample.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"value": ".AppId"
4646
},
4747
{
48-
"key": "Enter_the_Tenant_Name_Here",
48+
"key": "Enter_the_Tenant_Subdomain_Here",
4949
"value": "$tenantName"
5050
}
5151
]

1-Authentication/1-sign-in-react/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ Open the project in your IDE (like Visual Studio or Visual Studio Code) to confi
168168
169169
1. Open the `SPA\src\authConfig.js` file.
170170
1. Find the key `Enter_the_Application_Id_Here` and replace the existing value with the application ID (clientId) of `msal-react-spa` app copied from the Azure portal.
171-
1. Find the key `Enter_the_Tenant_Name_Here` and replace the existing value with the name of your Azure AD for Customers tenant.
171+
1. Find the placeholder `Enter_the_Tenant_Subdomain_Here` and replace it with the Directory (tenant) subdomain. For instance, if your tenant primary domain is `contoso.onmicrosoft.com`, use `contoso`. If you don't have your tenant domain name, learn how to [read your tenant details](https://review.learn.microsoft.com/azure/active-directory/external-identities/customers/how-to-create-customer-tenant-portal#get-the-customer-tenant-details).
172172
173173
### Step 4: Running the sample
174174

1-Authentication/1-sign-in-react/SPA/src/authConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { LogLevel } from '@azure/msal-browser';
1414
export const msalConfig = {
1515
auth: {
1616
clientId: 'Enter_the_Application_Id_Here', // This is the ONLY mandatory field that you need to supply.
17-
authority: 'https://Enter_the_Tenant_Name_Here.ciamlogin.com/', // Replace "Enter_the_Tenant_Name_Here" with your tenant name
17+
authority: 'https://Enter_the_Tenant_Subdomain_Here.ciamlogin.com/', // Replace "Enter_the_Tenant_Subdomain_Here" with your tenant subdomain
1818
redirectUri: '/', // Points to window.location.origin. You must register this URI on Azure Portal/App Registration.
1919
postLogoutRedirectUri: '/', // Indicates the page to navigate after logout.
2020
navigateToLoginRequestUrl: false, // If "true", will navigate back to the original request location before processing the auth code response.

0 commit comments

Comments
 (0)