Skip to content

Commit 186a369

Browse files
committed
2 parents f25a3b7 + 0d994cf commit 186a369

File tree

8,936 files changed

+142845
-83110
lines changed

Some content is hidden

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

8,936 files changed

+142845
-83110
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ _themes.VS.Modern/
2121
articles/directories.txt
2222
AzureMigration.ps1
2323

24-
!/.vscode/extensions.json
24+
!/.vscode/extensions.json

.openpublishing.publish.config.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,13 @@
7474
"path_to_root": "policy-templates",
7575
"url": "https://github.com/Azure/azure-policy",
7676
"branch": "master",
77-
"branch_mapping": {
78-
"release-build-mysql": "release-build",
79-
"release-build-postgresql": "release-build",
80-
"release-build-stellar": "release-build"
81-
}
77+
"branch_mapping": {}
78+
},
79+
{
80+
"path_to_root": "blueprints-templates",
81+
"url": "https://github.com/Azure/azure-blueprints",
82+
"branch": "master",
83+
"branch_mapping": {}
8284
},
8385
{
8486
"path_to_root": "azure-docs-json-samples",

.openpublishing.redirection.json

Lines changed: 1269 additions & 739 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Welcome to the open source [documentation](https://docs.microsoft.com/azure) of
44

55
## Getting Started
66

7-
Contributing to open source is more than just providing updates, it's also letting us know when there is an issue. Read our [Contributing guidance](.github/CONTRIBUTING.md) to find out more.
7+
Contributing to open source is more than just providing updates, it's also letting us know when there is an issue. Read our [Contributing guidance](CONTRIBUTING.md) to find out more.
88

99
### Prerequisites
1010

articles/active-directory-b2c/TOC.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
href: relyingparty.md
238238
- name: JavaScript samples
239239
href: javascript-samples.md
240-
- name: Release notes
240+
- name: Developer notes
241241
href: active-directory-b2c-developer-notes-custom.md
242242
- name: Trust Framework definition
243243
href: active-directory-b2c-reference-trustframeworks-defined-ief-custom.md
@@ -291,6 +291,8 @@
291291
items:
292292
- name: Code samples
293293
href: https://azure.microsoft.com/resources/samples/?service=active-directory-b2c
294+
- name: Cookie definitions
295+
href: cookie-definitions.md
294296
- name: Region availability & data residency
295297
href: active-directory-b2c-reference-tenant-type.md
296298
- name: Enable billing

articles/active-directory-b2c/active-directory-b2c-apps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ To learn how to secure a web API by using Azure AD B2C, check out the web API tu
104104

105105
Applications that are installed on devices, such as mobile and desktop applications, often need to access back-end services or web APIs on behalf of users. You can add customized identity management experiences to your native applications and securely call back-end services by using Azure AD B2C and the [OAuth 2.0 authorization code flow](active-directory-b2c-reference-oauth-code.md).
106106

107-
In this flow, the application executes [policies](active-directory-b2c-reference-policies.md) and receives an `authorization_code` from Azure AD after the user completes the policy. The `authorization_code` represents the application's permission to call back-end services on behalf of the user who is currently signed in. The application can then exchange the `authorization_code` in the background for an `id_token` and a `refresh_token`. The application can use the `id_token` to authenticate to a back-end web API in HTTP requests. It can also use the `refresh_token` to get a new `id_token` when an older one expires.
107+
In this flow, the application executes [policies](active-directory-b2c-reference-policies.md) and receives an `authorization_code` from Azure AD after the user completes the policy. The `authorization_code` represents the application's permission to call back-end services on behalf of the user who is currently signed in. The application can then exchange the `authorization_code` in the background for an `access_token` and a `refresh_token`. The application can use the `access_token` to authenticate to a back-end web API in HTTP requests. It can also use the `refresh_token` to get a new `access_token` when an older one expires.
108108

109109
## Current limitations
110110

articles/active-directory-b2c/active-directory-b2c-create-custom-attributes-profile-edit-custom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ The ID token sent back to your application includes the new extension property a
291291

292292
## Reference
293293

294-
For more information on extension properties, see the article [Directory schema extensions | Graph API concepts](https://msdn.microsoft.com/Library/Azure/Ad/Graph/howto/azure-ad-graph-api-directory-schema-extensions).
294+
For more information on extension properties, see the article [Directory schema extensions | Graph API concepts](/previous-versions/azure/ad/graph/howto/azure-ad-graph-api-directory-schema-extensions).
295295

296296
> [!NOTE]
297297
> * A **TechnicalProfile** is an element type, or function, that defines an endpoint’s name, metadata, and protocol. The **TechnicalProfile** details the exchange of claims that the Identity Experience Framework performs. When this function is called in an orchestration step or from another **TechnicalProfile**, the **InputClaims** and **OutputClaims** are provided as parameters by the caller.

articles/active-directory-b2c/active-directory-b2c-custom-guide-eventlogger-appins.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,15 @@ ms.subservice: B2C
1515
---
1616
# Track user behavior in Azure Active Directory B2C using Application Insights
1717

18+
[!INCLUDE [active-directory-b2c-public-preview](../../includes/active-directory-b2c-public-preview.md)]
19+
1820
When you use Azure Active Directory (Azure AD) B2C together with Azure Application Insights, you can get detailed and customized event logs for your user journeys. In this article, you learn how to:
1921

2022
* Gain insights on user behavior.
2123
* Troubleshoot your own policies in development or in production.
2224
* Measure performance.
2325
* Create notifications from Application Insights.
2426

25-
> [!NOTE]
26-
> This feature is in preview.
27-
2827
## How it works
2928

3029
The Identity Experience Framework in Azure AD B2C includes the provider `Handler="Web.TPEngine.Providers.AzureApplicationInsightsProvider, Web.TPEngine, Version=1.0.0.0`. It sends event data directly to Application Insights by using the instrumentation key provided to Azure AD B2C.

articles/active-directory-b2c/active-directory-b2c-custom-rest-api-netfw-secure-basic.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ ms.date: 09/25/2017
1212
ms.author: davidmu
1313
ms.subservice: B2C
1414
---
15-
1615
# Secure your RESTful services by using HTTP basic authentication
1716

1817
[!INCLUDE [active-directory-b2c-advanced-audience-warning](../../includes/active-directory-b2c-advanced-audience-warning.md)]
@@ -24,11 +23,13 @@ In this article, you add HTTP basic authentication to your RESTful service so th
2423
For more information, see [Basic authentication in ASP.NET web API](https://docs.microsoft.com/aspnet/web-api/overview/security/basic-authentication).
2524

2625
## Prerequisites
26+
2727
Complete the steps in the [Integrate REST API claims exchanges in your Azure AD B2C user journey](active-directory-b2c-custom-rest-api-netfw.md) article.
2828

2929
## Step 1: Add authentication support
3030

3131
### Step 1.1: Add application settings to your project's web.config file
32+
3233
1. Open the Visual Studio project that you created earlier.
3334

3435
2. Add the following application settings to the web.config file under the `appSettings` element:
@@ -42,7 +43,7 @@ Complete the steps in the [Integrate REST API claims exchanges in your Azure AD
4243

4344
To generate a complex password, run the following PowerShell code. You can use any arbitrary value.
4445

45-
```PowerShell
46+
```powershell
4647
$bytes = New-Object Byte[] 32
4748
$rand = [System.Security.Cryptography.RandomNumberGenerator]::Create()
4849
$rand.GetBytes($bytes)
@@ -51,15 +52,17 @@ Complete the steps in the [Integrate REST API claims exchanges in your Azure AD
5152
```
5253

5354
### Step 1.2: Install OWIN libraries
55+
5456
To begin, add the OWIN middleware NuGet packages to the project by using the Visual Studio Package Manager Console:
5557

56-
```
58+
```powershell
5759
PM> Install-Package Microsoft.Owin
5860
PM> Install-Package Owin
5961
PM> Install-Package Microsoft.Owin.Host.SystemWeb
6062
```
6163

6264
### Step 1.3: Add an authentication middleware class
65+
6366
Add the `ClientAuthMiddleware.cs` class under the *App_Start* folder. To do so:
6467

6568
1. Right-click the *App_Start* folder, select **Add**, and then select **Class**.
@@ -183,6 +186,7 @@ Add the `ClientAuthMiddleware.cs` class under the *App_Start* folder. To do so:
183186
```
184187

185188
### Step 1.4: Add an OWIN startup class
189+
186190
Add an OWIN startup class named `Startup.cs` to the API. To do so:
187191
1. Right-click the project, select **Add** > **New Item**, and then search for **OWIN**.
188192

@@ -208,17 +212,21 @@ Add an OWIN startup class named `Startup.cs` to the API. To do so:
208212
```
209213

210214
### Step 1.5: Protect the Identity API class
215+
211216
Open Controllers\IdentityController.cs, and add the `[Authorize]` tag to the controller class. This tag restricts access to the controller to users who meet the authorization requirement.
212217

213218
![Add the Authorize tag to the controller](media/aadb2c-ief-rest-api-netfw-secure-basic/rest-api-netfw-secure-basic-authorize.png)
214219

215220
## Step 2: Publish to Azure
221+
216222
To publish your project, in Solution Explorer, right-click the **Contoso.AADB2C.API** project, and then select **Publish**.
217223

218224
## Step 3: Add the RESTful services app ID and app secret to Azure AD B2C
225+
219226
After your RESTful service is protected by the client ID (username) and secret, you must store the credentials in your Azure AD B2C tenant. Your custom policy provides the credentials when it invokes your RESTful services.
220227

221228
### Step 3.1: Add a RESTful services client ID
229+
222230
1. In your Azure AD B2C tenant, select **B2C Settings** > **Identity Experience Framework**.
223231

224232

@@ -240,6 +248,7 @@ After your RESTful service is protected by the client ID (username) and secret,
240248
9. Confirm that you've created the `B2C_1A_B2cRestClientId` key.
241249

242250
### Step 3.2: Add a RESTful services client secret
251+
243252
1. In your Azure AD B2C tenant, select **B2C Settings** > **Identity Experience Framework**.
244253

245254
2. Select **Policy Keys** to view the keys available in your tenant.
@@ -260,13 +269,15 @@ After your RESTful service is protected by the client ID (username) and secret,
260269
9. Confirm that you've created the `B2C_1A_B2cRestClientSecret` key.
261270

262271
## Step 4: Change the technical profile to support basic authentication in your extension policy
272+
263273
1. In your working directory, open the extension policy file (TrustFrameworkExtensions.xml).
264274

265275
2. Search for the `<TechnicalProfile>` node that includes `Id="REST-API-SignUp"`.
266276

267277
3. Locate the `<Metadata>` element.
268278

269279
4. Change the *AuthenticationType* to *Basic*, as follows:
280+
270281
```xml
271282
<Item Key="AuthenticationType">Basic</Item>
272283
```
@@ -279,6 +290,7 @@ After your RESTful service is protected by the client ID (username) and secret,
279290
<Key Id="BasicAuthenticationPassword" StorageReferenceId="B2C_1A_B2cRestClientSecret" />
280291
</CryptographicKeys>
281292
```
293+
282294
After you add the snippet, your technical profile should look like the following XML code:
283295

284296
![Add basic authentication XML elements](media/aadb2c-ief-rest-api-netfw-secure-basic/rest-api-netfw-secure-basic-add-1.png)
@@ -298,6 +310,7 @@ After your RESTful service is protected by the client ID (username) and secret,
298310
6. Upload the *TrustFrameworkExtensions.xml* file, and then ensure that it passes validation.
299311

300312
## Step 6: Test the custom policy by using Run Now
313+
301314
1. Open **Azure AD B2C Settings**, and then select **Identity Experience Framework**.
302315

303316
>[!NOTE]
@@ -335,9 +348,10 @@ After your RESTful service is protected by the client ID (username) and secret,
335348
```
336349

337350
## (Optional) Download the complete policy files and code
351+
338352
* After you complete the [Get started with custom policies](active-directory-b2c-get-started-custom.md) walkthrough, we recommend that you build your scenario by using your own custom policy files. For your reference, we have provided [Sample policy files](https://github.com/Azure-Samples/active-directory-b2c-custom-policy-starterpack/tree/master/scenarios/aadb2c-ief-rest-api-netfw-secure-basic).
339353
* You can download the complete code from [Sample Visual Studio solution for reference](https://github.com/Azure-Samples/active-directory-b2c-custom-policy-starterpack/tree/master/scenarios/aadb2c-ief-rest-api-netfw/Contoso.AADB2C.API).
340354
341355
## Next steps
342-
* [Use client certificates to secure your RESTful API](active-directory-b2c-custom-rest-api-netfw-secure-cert.md)
343356

357+
* [Use client certificates to secure your RESTful API](active-directory-b2c-custom-rest-api-netfw-secure-cert.md)

0 commit comments

Comments
 (0)