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: articles/active-directory-b2c/active-directory-b2c-custom-rest-api-netfw-secure-cert.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -148,7 +148,7 @@ To support client certificate authentication in your custom policy, change the t
148
148
>If you receive the error message, *The name is not valid, please provide a valid name*, it means that Azure AD B2C successfully called your RESTful service while it presented the client certificate. The next step is to validate the certificate.
149
149
150
150
## Step 6: Add certificate validation
151
-
The client certificate that Azure AD B2C sends to your RESTful service does not undergo validation by the Azure Web Apps platform, except to check whether the certificate exists. Validating the certificate is the responsibility of the web app.
151
+
The client certificate that Azure AD B2C sends to your RESTful service does not undergo validation by the Azure App Service platform, except to check whether the certificate exists. Validating the certificate is the responsibility of the web app.
152
152
153
153
In this section, you add sample ASP.NET code that validates the certificate properties for authentication purposes.
Copy file name to clipboardExpand all lines: articles/active-directory-b2c/active-directory-b2c-devquickstarts-native-dotnet.md
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -17,10 +17,10 @@ ms.component: B2C
17
17
By using Azure Active Directory (Azure AD) B2C, you can add powerful self-service identity management features to your desktop app in a few short steps. This article will show you how to create a .NET Windows Presentation Foundation (WPF) "to-do list" app that includes user sign-up, sign-in, and profile management. The app will include support for sign-up and sign-in by using a user name or email. It will also include support for sign-up and sign-in by using social accounts such as Facebook and Google.
18
18
19
19
## Get an Azure AD B2C directory
20
-
Before you can use Azure AD B2C, you must create a directory, or tenant. A directory is a container for all of your users, apps, groups, and more. If you don't have one already, [create a B2C directory](active-directory-b2c-get-started.md) before you continue in this guide.
20
+
Before you can use Azure AD B2C, you must create a directory, or tenant. A directory is a container for all of your users, apps, groups, and more. If you don't have one already, [create a B2C directory](active-directory-b2c-get-started.md) before you continue in this guide.
21
21
22
22
## Create an application
23
-
Next, you need to create an app in your B2C directory. This gives Azure AD information that it needs to securely communicate with your app. To create an app, follow [these instructions](active-directory-b2c-app-registration.md). Be sure to:
23
+
Next, you need to create an app in your B2C directory. This gives Azure AD information that it needs to securely communicate with your app. To create an app, follow [these instructions](active-directory-b2c-app-registration.md). Be sure to:
24
24
25
25
* Include a **native client** in the application.
26
26
* Copy the **Redirect URI**`urn:ietf:wg:oauth:2.0:oob`. It is the default URL for this code sample.
@@ -33,7 +33,7 @@ In Azure AD B2C, every user experience is defined by a [policy](active-directory
33
33
* Choose either **User ID sign-up** or **Email sign-up** in the identity providers blade.
34
34
* Choose **Display name** and other sign-up attributes in your sign-up policy.
35
35
* Choose **Display name** and **Object ID** claims as application claims for every policy. You can choose other claims as well.
36
-
* Copy the **Name** of each policy after you create it. It should have the prefix `b2c_1_`. You'll need these policy names later.
36
+
* Copy the **Name** of each policy after you create it. It should have the prefix `b2c_1_`. You'll need these policy names later.
The completed app is also [available as a .zip file](https://github.com/AzureADQuickStarts/B2C-NativeClient-DotNet/archive/complete.zip) or on the `complete` branch of the same repository.
50
50
51
-
After you download the sample code, open the Visual Studio .sln file to get started. The `TaskClient` project is the WPF desktop application that the user interacts with. For the purposes of this tutorial, it calls a back-end task web API, hosted in Azure, that stores each user's to-do list. You do not need to build the web API, we already have it running for you.
51
+
After you download the sample code, open the Visual Studio .sln file to get started. The `TaskClient` project is the WPF desktop application that the user interacts with. For the purposes of this tutorial, it calls a back-end task web API, hosted in Azure, that stores each user's to-do list. You do not need to build the web API, we already have it running for you.
52
52
53
53
To learn how a web API securely authenticates requests by using Azure AD B2C, check out the
54
54
[web API getting started article](active-directory-b2c-devquickstarts-api-dotnet.md).
YoucanalsouseMSALtokeeptrackoftheuser's sign-in state. In this app, we want the user to remain signed in even after they close the app & re-open it. Back inside the `OnInitialized` override, use MSAL's `AcquireTokenSilent` methodtocheckforcachedtokens:
188
+
YoucanalsouseMSALtokeeptrackoftheuser's sign-in state. In this app, we want the user to remain signed in even after they close the app and re-open it. Back inside the `OnInitialized` override, use MSAL's `AcquireTokenSilent` methodtocheckforcachedtokens:
189
189
190
190
```csharp
191
191
AuthenticationResultresult=null;
@@ -207,7 +207,7 @@ catch (MsalException ex)
207
207
{
208
208
if (ex.ErrorCode=="failed_to_acquire_token_silently")
209
209
{
210
-
// There are no tokens in the cache. Proceed without calling the To Do list service.
210
+
// There are no tokens in the cache. Proceed without calling the To Do list service.
211
211
}
212
212
else
213
213
{
@@ -224,7 +224,7 @@ catch (MsalException ex)
224
224
```
225
225
226
226
## Call the task API
227
-
YouhavenowusedMSALtoexecutepoliciesandgettokens. WhenyouwanttouseonethesetokenstocallthetaskAPI, youcanagainuseMSAL's `AcquireTokenSilent` method to check for cached tokens:
227
+
YouhavenowusedMSALtoexecutepoliciesandgettokens. WhenyouwanttouseonethesetokenstocallthetaskAPI, youcanagainuseMSAL's `AcquireTokenSilent` method to check for cached tokens:
228
228
229
229
```csharp
230
230
privateasyncvoidGetTodoList()
@@ -282,7 +282,7 @@ When the call to `AcquireTokenSilentAsync(...)` succeeds and a token is found in
282
282
```
283
283
284
284
## Sign the user out
285
-
Finally, youcanuseMSALtoendauser's session with the app when the user selects **Sign out**. When using MSAL, this is accomplished by clearing all of the tokens from the token cache:
285
+
Finally, youcanuseMSALtoendauser's session with the app when the user selects **Sign out**. When using MSAL, this is accomplished by clearing all of the tokens from the token cache:
Finally, buildandrunthesample. Signupfortheappbyusinganemailaddressorusername. Signoutandsignbackinasthesameuser. Editthatuser's profile. Sign out and sign up by using a different user.
307
+
Finally, buildandrunthesample. Signupfortheappbyusinganemailaddressorusername. Signoutandsignbackinasthesameuser. Editthatuser's profile. Sign out and sign up by using a different user.
0 commit comments