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/README.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,10 +96,7 @@ As a first step you'll need to:
96
96
- In the Redirect URIs section, select **Web** in the combo-box and enter the following redirect URIs.
97
97
- `https://localhost:44321/`
98
98
- `https://localhost:44321/signin-oidc`
99
-
- In the **Advanced settings** section set **Logout URL** to `https://localhost:44321/signout-oidc`
100
-
- In the **Advanced settings** | **Implicit grant** section, check **ID tokens** as this sample requires
101
-
the [ID Token](https://docs.microsoft.com/azure/active-directory/develop/id-tokens) to be enabled to
102
-
sign-in the user.
99
+
- In the **Advanced settings** section set **Logout URL** to `https://localhost:44321/signout-oidc`
103
100
<details open=true>
104
101
<summary>Expand/collapse screenshot</summary>
105
102
@@ -109,7 +106,12 @@ As a first step you'll need to:
109
106
110
107
1. Select **Save**.
111
108
112
-
> Note that unless the Web App calls a Web API, no certificate or secret is needed.
109
+
1. In the app's registration screen, select the **Certificates & secrets** blade in the left to open the page where we can generate secrets and upload certificates.
110
+
1. In the **Client secrets** section, select **New client secret** and add a new secret
111
+
112
+
> [!NOTE]
113
+
> Secrets are weak credentials. In production, use a federated credential if you are hosted on Azure, or a certificate otherwise. See https://aka.ms/idweb/client-credentials
114
+
113
115
114
116
### Step 2: Download/ Clone this sample code or build the application using a template
115
117
@@ -132,7 +134,8 @@ cd "1-WebApp-OIDC\1-1-MyOrg"
132
134
- replace the `ClientID` value with the *Application ID* from the application you registered in Application Registration portal on *Step 1*.
133
135
- replace the `TenantId` value with the *Tenant ID* where you registered your Application on *Step 1*.
134
136
- replace the `Domain` value with the *Microsoft Entra domain name*, e.g. contoso.onmicrosoft.com where you registered your Application on *Step 1*.
135
-
137
+
- replace the `ClientSecret` value with the *client secret* you created in the previous step.
138
+
136
139
#### Option 2: Create the sample from the command line
137
140
138
141
1. Run the following command to create a sample from the command line using the `SingleOrg` template:
Copy file name to clipboardExpand all lines: 1-WebApp-OIDC/1-1-MyOrg/appsettings.json
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,13 @@
5
5
"TenantId": "[Enter 'common', or 'organizations' or the Tenant Id (Obtained from the Azure portal. Select 'Endpoints' from the 'App registrations' blade and use the GUID in any of the URLs), e.g. da41245a5-11b3-996c-00a8-4d99re19f292]",
6
6
"ClientId": "[Enter the Client Id (Application ID obtained from the Azure portal), e.g. ba74781c2-53c2-442a-97c2-3d60re42f403]",
"SourceType": "ClientSecret", // Secrets are weak credentials. Use certificates or federated credentials instead. See https://aka.ms/idweb/client-credentials
0 commit comments