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
Copy file name to clipboardExpand all lines: 1-WebApp-OIDC/1-1-MyOrg/AppCreationScripts/AppCreationScripts.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Registering the Azure Active Directory applications and updating the configuration files for this sample using PowerShell scripts
1
+
# Registering the sample apps with Microsoft identity platform and updating the configuration files using PowerShell scripts
2
2
3
3
## Overview
4
4
@@ -9,9 +9,10 @@
9
9
```PowerShell
10
10
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process -Force
11
11
```
12
-
1. Run the script to create your Azure AD application and configure the code of the sample application accordinly. (Other ways of running the scripts are described below)
12
+
1. Run the script to create your Azure AD application and configure the code of the sample application accordingly. (Other ways of running the scripts are described below)
13
13
```PowerShell
14
-
.\AppCreationScripts\Configure.ps1
14
+
cd .\AppCreationScripts\
15
+
.\Configure.ps1
15
16
```
16
17
1. Open the Visual Studio solution and click start
Copy file name to clipboardExpand all lines: 1-WebApp-OIDC/1-2-AnyOrg/AppCreationScripts/AppCreationScripts.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Registering the Azure Active Directory applications and updating the configuration files for this sample using PowerShell scripts
1
+
# Registering the sample apps with Microsoft identity platform and updating the configuration files using PowerShell scripts
2
2
3
3
## Overview
4
4
@@ -9,9 +9,10 @@
9
9
```PowerShell
10
10
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process -Force
11
11
```
12
-
1. Run the script to create your Azure AD application and configure the code of the sample application accordinly. (Other ways of running the scripts are described below)
12
+
1. Run the script to create your Azure AD application and configure the code of the sample application accordingly. (Other ways of running the scripts are described below)
13
13
```PowerShell
14
-
.\AppCreationScripts\Configure.ps1
14
+
cd .\AppCreationScripts\
15
+
.\Configure.ps1
15
16
```
16
17
1. Open the Visual Studio solution and click start
Copy file name to clipboardExpand all lines: 1-WebApp-OIDC/1-2-AnyOrg/README-1-1-to-1-2.md
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,18 @@
2
2
services: active-directory
3
3
platforms: dotnet
4
4
author: jmprieur
5
-
level: 100
5
+
level: 200
6
6
client: ASP.NET Core Web App
7
7
endpoint: Microsoft identity platform
8
+
page_type: sample
9
+
languages:
10
+
- csharp
11
+
products:
12
+
- azure
13
+
- azure-active-directory
14
+
- dotnet
15
+
- office-ms-graph
16
+
description: "Change your ASP.NET Core Web app to sign-in users in any org with the Microsoft identity platform"
8
17
---
9
18
# Change your ASP.NET Core Web app to sign-in users in any org with the Microsoft identity platform
10
19
@@ -44,11 +53,11 @@ The actual sign-in audience (accounts to sign-in) is the lowest set of what is s
44
53
- setting in the portal the **Supported account types** to **Accounts in any organizational directory and personal Microsoft accounts (e.g. Skype, Xbox, Outlook.com)** and set the `TenantId` value to `"organizations"` in the **appsettings.json** file
45
54
- setting in the portal the **Supported account types** to **Accounts in any organizational directory** and set the `TenantId` value to `"common"` in the **appsettings.json** file
46
55
47
-
## How to restrict users from specific organizations to sign-in to your web app
56
+
## How to restrict users from specific organizations from signing-in your web app
48
57
49
-
In order to restrict users from specific organizations to sign-in to your web app, you'll need to follow the steps above, and customize a bit more the code to restrict the valid token issuers. The token issuers are really the tenanted Azure AD authority which are allowed to issue a token to access your web application.
58
+
In order to restrict users from specific organizations from signing-in to your web app, you'll need to customize your code a bit more to restrict issuers. In Azure AD, the token issuers are the Azure AD tenants which issue tokens to applications.
50
59
51
-
In the `Startup.cs` file, in the `ConfigureServices` method, after `services.AddMicrosoftIdentityPlatformAuthentication(Configuration)` add some code to validate specific issuers by overriding the `TokenValidationParameters.IssuerValidator` delegate.
60
+
In the `Startup.cs` file, in the `ConfigureServices` method, after `services.AddMicrosoftIdentityPlatformAuthentication(Configuration)` add some code to filter issuers by overriding the `TokenValidationParameters.IssuerValidator` delegate.
0 commit comments