Skip to content

Commit 1d3bd45

Browse files
author
ajburnle
committed
Merge branch 'master' of https://github.com/MicrosoftDocs/azure-docs-pr into aj-githubissues-jan
2 parents 3e05841 + 75ff5c7 commit 1d3bd45

File tree

95 files changed

+1511
-484
lines changed

Some content is hidden

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

95 files changed

+1511
-484
lines changed

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47906,6 +47906,11 @@
4790647906
"redirect_url": "/azure/mysql/concepts-azure-ad-authentication",
4790747907
"redirect_document_id": false
4790847908
},
47909+
{
47910+
"source_path": "articles/active-directory/authentication/tutorial-mfa-applications.md",
47911+
"redirect_url": "/azure/active-directory/authentication/tutorial-enable-azure-mfa",
47912+
"redirect_document_id": true
47913+
},
4790947914
{
4791047915
"source_path": "articles/load-balancer/quickstart-create-basic-load-balancer-portal.md",
4791147916
"redirect_url": "/azure/load-balancer/quickstart-load-balancer-standard-public-portal",

articles/active-directory-b2c/TOC.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,6 @@
182182
- name: Custom email
183183
href: custom-email.md
184184
displayName: verification
185-
- name: Page layout
186-
href: page-layout.md
187185
- name: Enable JavaScript
188186
href: javascript-samples.md
189187
- name: Password complexity
@@ -383,6 +381,8 @@
383381
href: custom-policy-developer-notes.md
384382
- name: Code samples
385383
href: https://azure.microsoft.com/resources/samples/?service=active-directory-b2c
384+
- name: Page layout versions
385+
href: page-layout.md
386386
- name: Cookie definitions
387387
href: cookie-definitions.md
388388
displayName: cookies, SameSite
@@ -421,4 +421,4 @@
421421
href: support-options.md
422422
displayName: technical
423423
- name: Videos
424-
href: https://azure.microsoft.com/documentation/videos/index/?services=active-directory-b2c
424+
href: https://azure.microsoft.com/documentation/videos/index/?services=active-directory-b2c

articles/active-directory-b2c/contentdefinitions.md

Lines changed: 54 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
title: ContentDefinitions - Azure Active Directory B2C | Microsoft Docs
2+
title: ContentDefinitions
3+
titleSuffix: Azure AD B2C
34
description: Specify the ContentDefinitions element of a custom policy in Azure Active Directory B2C.
45
services: active-directory-b2c
56
author: mmacy
@@ -8,7 +9,7 @@ manager: celestedg
89
ms.service: active-directory
910
ms.workload: identity
1011
ms.topic: reference
11-
ms.date: 09/10/2018
12+
ms.date: 02/10/2020
1213
ms.author: marsma
1314
ms.subservice: B2C
1415
---
@@ -52,7 +53,6 @@ The metadata of the **LocalAccountSignUpWithLogonEmail** self-asserted technical
5253
...
5354
```
5455

55-
5656
## ContentDefinition
5757

5858
The **ContentDefinition** element contains the following attribute:
@@ -68,22 +68,59 @@ The **ContentDefinition** element contains the following elements:
6868
| LoadUri | 1:1 | A string that contains the URL of the HTML5 page for the content definition. |
6969
| RecoveryUri | 0:1 | A string that contains the URL of the HTML page for displaying an error relating to the content definition. |
7070
| DataUri | 1:1 | A string that contains the relative URL of an HTML file that provides the user experience to invoke for the step. |
71-
| Metadata | 1:1 | A collection of key/value pairs that contains the metadata utilized by the content definition. |
71+
| Metadata | 0:1 | A collection of key/value pairs that contains the metadata utilized by the content definition. |
7272
| LocalizedResourcesReferences | 0:1 | A collection of localized resources references. Use this element to customize the localization of a user interface and claims attribute. |
7373

7474
### DataUri
7575

76-
The **DataUri** element is used to specify the page identifier. Azure AD B2C uses the page identifier to load and initiate UI elements and client side JavaScript. The format of the value is `urn:com:microsoft:aad:b2c:elements:page-name:version`. The following table lists the values and descriptions of the page identifiers you can use.
76+
The **DataUri** element is used to specify the page identifier. Azure AD B2C uses the page identifier to load and initiate UI elements and client side JavaScript. The format of the value is `urn:com:microsoft:aad:b2c:elements:page-name:version`. The following table lists the page identifiers you can use.
7777

78-
| Value | Description |
78+
| Page identifier | Description |
7979
| ----- | ----------- |
80-
| `urn:com:microsoft:aad:b2c:elements:globalexception:1.1.0` | Displays an error page when an exception or an error is encountered. |
81-
| `urn:com:microsoft:aad:b2c:elements:idpselection:1.0.0` | Lists the identity providers that users can choose from during sign-in. |
82-
| `urn:com:microsoft:aad:b2c:elements:unifiedssp:1.0.0` | Displays a form for signing in with a local account that's based on an email address or a user name. This value also provides the “keep me sign-in functionality” and “Forgot your password?” link. |
83-
| `urn:com:microsoft:aad:b2c:elements:unifiedssd:1.0.0` | Displays a form for signing in with a local account that's based on an email address or a user name. |
84-
| `urn:com:microsoft:aad:b2c:elements:multifactor:1.1.0` | Verifies phone numbers by using text or voice during sign-up or sign-in. |
85-
| `urn:com:microsoft:aad:b2c:elements:selfasserted:1.1.0` | Displays a form that enables users to create or update their profile. |
80+
| `globalexception` | Displays an error page when an exception or an error is encountered. |
81+
| `providerselection` | Lists the identity providers that users can choose from during sign-in. |
82+
| `unifiedssp` | Displays a form for signing in with a local account that's based on an email address or a user name. This value also provides the “keep me sign-in functionality” and “Forgot your password?” link. |
83+
| `unifiedssp` | Displays a form for signing in with a local account that's based on an email address or a user name. |
84+
| `multifactor` | Verifies phone numbers by using text or voice during sign-up or sign-in. |
85+
| `selfasserted` | Displays a form that enables users to create or update their profile. |
86+
87+
## Select a page layout
88+
89+
You can enable [JavaScript client-side code](javascript-samples.md) by inserting `contract` between `elements` and the page type. For example, `urn:com:microsoft:aad:b2c:elements:contract:page-name:version`.
90+
91+
[!INCLUDE [active-directory-b2c-public-preview](../../includes/active-directory-b2c-public-preview.md)]
8692

93+
The [version](page-layout.md) part of the `DataUri` specifies the package of content containing HTML, CSS, and JavaScript for the user interface elements in your policy. If you intend to enable JavaScript client-side code, the elements you base your JavaScript on must be immutable. If they're not immutable, any changes could cause unexpected behavior on your user pages. To prevent these issues, enforce the use of a page layout and specify a page layout version. Doing so ensures that all content definitions you’ve based your JavaScript on are immutable. Even if you don’t intend to enable JavaScript, you still need to specify the page layout version for your pages.
94+
95+
The following example shows the **DataUri** of `selfasserted` version `1.2.0`:
96+
97+
```xml
98+
<ContentDefinition Id="api.localaccountpasswordreset">
99+
<LoadUri>~/tenant/templates/AzureBlue/selfAsserted.cshtml</LoadUri>
100+
<RecoveryUri>~/common/default_page_error.html</RecoveryUri>
101+
<DataUri>urn:com:microsoft:aad:b2c:elements:contract:selfasserted:1.2.0</DataUri>
102+
<Metadata>
103+
<Item Key="DisplayName">Local account change password page</Item>
104+
</Metadata>
105+
</ContentDefinition>
106+
```
107+
108+
#### Migrating to page layout
109+
110+
The format of the value must contain the word `contract`: _urn:com:microsoft:aad:b2c:elements:**contract**:page-name:version_. To specify a page layout in your custom policies that use an old **DataUri** value, use following table to migrate to the new format.
111+
112+
| Old DataUri value | New DataUri value |
113+
| ----------------- | ----------------- |
114+
| `urn:com:microsoft:aad:b2c:elements:globalexception:1.0.0` | `urn:com:microsoft:aad:b2c:elements:contract:globalexception:1.2.0` |
115+
| `urn:com:microsoft:aad:b2c:elements:globalexception:1.1.0` | `urn:com:microsoft:aad:b2c:elements:contract:globalexception:1.2.0` |
116+
| `urn:com:microsoft:aad:b2c:elements:idpselection:1.0.0` | `urn:com:microsoft:aad:b2c:elements:contract:providerselection:1.2.0` |
117+
| `urn:com:microsoft:aad:b2c:elements:multifactor:1.0.0` | `urn:com:microsoft:aad:b2c:elements:contract:multifactor:1.2.0` |
118+
| `urn:com:microsoft:aad:b2c:elements:multifactor:1.1.0` | `urn:com:microsoft:aad:b2c:elements:contract:multifactor:1.2.0` |
119+
| `urn:com:microsoft:aad:b2c:elements:selfasserted:1.0.0` | `urn:com:microsoft:aad:b2c:elements:contract:selfasserted:1.2.0` |
120+
| `urn:com:microsoft:aad:b2c:elements:selfasserted:1.1.0` | `urn:com:microsoft:aad:b2c:elements:contract:selfasserted:1.2.0` |
121+
| `urn:com:microsoft:aad:b2c:elements:unifiedssd:1.0.0` | `urn:com:microsoft:aad:b2c:elements:contract:unifiedssd:1.2.0` |
122+
| `urn:com:microsoft:aad:b2c:elements:unifiedssp:1.0.0` | `urn:com:microsoft:aad:b2c:elements:contract:unifiedssp:1.2.0` |
123+
| `urn:com:microsoft:aad:b2c:elements:unifiedssp:1.1.0` | `urn:com:microsoft:aad:b2c:elements:contract:unifiedssp:1.2.0` |
87124

88125
### LocalizedResourcesReferences
89126

@@ -100,19 +137,6 @@ The **LocalizedResourcesReferences** element contains the following attributes:
100137
| Language | Yes | A string that contains a supported language for the policy per RFC 5646 - Tags for Identifying Languages. |
101138
| LocalizedResourcesReferenceId | Yes | The identifier of the **LocalizedResources** element. |
102139

103-
The following example shows a sign-up or sign-in content definition:
104-
105-
```XML
106-
<ContentDefinition Id="api.signuporsignin">
107-
<LoadUri>~/tenant/default/unified.cshtml</LoadUri>
108-
<RecoveryUri>~/common/default_page_error.html</RecoveryUri>
109-
<DataUri>urn:com:microsoft:aad:b2c:elements:unifiedssp:1.0.0</DataUri>
110-
<Metadata>
111-
<Item Key="DisplayName">Signin and Signup</Item>
112-
</Metadata>
113-
</ContentDefinition>
114-
```
115-
116140
The following example shows a sign-up or sign-in content definition with a reference to localization for English, French and Spanish:
117141

118142
```XML
@@ -150,3 +174,8 @@ The ID attribute of the **ContentDefinition** element specifies the type of page
150174
| **api.selfasserted.profileupdate** | [updateprofile.cshtml](https://login.microsoftonline.com/static/tenant/default/updateProfile.cshtml) | **Profile update page** - Displays a form that users can access to update their profile. This page is similar to the social account sign up page, except for the password entry fields. |
151175
| **api.signuporsignin** | [unified.cshtml](https://login.microsoftonline.com/static/tenant/default/unified.cshtml) | **Unified sign-up or sign-in page** - Handles the user sign-up and sign-in process. Users can use enterprise identity providers, social identity providers such as Facebook or Google+, or local accounts. |
152176

177+
## Next steps
178+
179+
For an example of customizing the user interface by using content definitions, see:
180+
181+
[Customize the user interface of your application using a custom policy](custom-policy-ui-customization.md)

articles/active-directory-b2c/javascript-samples.md

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
title: JavaScript samples - Azure Active Directory B2C | Microsoft Docs
2+
title: JavaScript samples
3+
titleSuffix: Azure AD B2C
34
description: Learn about using JavaScript in Azure Active Directory B2C.
45
services: active-directory-b2c
56
author: mmacy
@@ -8,7 +9,7 @@ manager: celestedg
89
ms.service: active-directory
910
ms.workload: identity
1011
ms.topic: conceptual
11-
ms.date: 04/25/2019
12+
ms.date: 02/10/2020
1213
ms.author: marsma
1314
ms.subservice: B2C
1415
---
@@ -17,7 +18,15 @@ ms.subservice: B2C
1718

1819
[!INCLUDE [active-directory-b2c-public-preview](../../includes/active-directory-b2c-public-preview.md)]
1920

20-
You can add your own JavaScript client-side code to your Azure Active Directory B2C (Azure AD B2C) applications. To enable JavaScript for your applications, you must add an element to your [custom policy](custom-policy-overview.md), select a [page layout](page-layout.md), and use [b2clogin.com](b2clogin.md) in your requests. This article describes how you can change your custom policy to enable script execution.
21+
You can add your own JavaScript client-side code to your Azure Active Directory B2C (Azure AD B2C) applications.
22+
23+
To enable JavaScript for your applications:
24+
25+
* Add an element to your [custom policy](custom-policy-overview.md)
26+
* Select a [page layout](page-layout.md)
27+
* Use [b2clogin.com](b2clogin.md) in your requests
28+
29+
This article describes how you can change your custom policy to enable script execution.
2130

2231
> [!NOTE]
2332
> If you want to enable JavaScript for user flows, see [JavaScript and page layout versions in Azure Active Directory B2C](user-flow-javascript-overview.md).
@@ -26,9 +35,9 @@ You can add your own JavaScript client-side code to your Azure Active Directory
2635

2736
### Select a page layout
2837

29-
* [Select a page layout](page-layout.md) for the user interface elements of your application.
38+
* Select a [page layout](contentdefinitions.md#select-a-page-layout) for the user interface elements of your application.
3039

31-
If you intend to use JavaScript, you need to [define a page layout version](page-layout.md#replace-datauri-values) for *all* of the content definitions in your custom policy.
40+
If you intend to use JavaScript, you need to [define a page layout version](contentdefinitions.md#migrating-to-page-layout) with page `contract` version for *all* of the content definitions in your custom policy.
3241

3342
## Add the ScriptExecution element
3443

@@ -48,25 +57,7 @@ You enable script execution by adding the **ScriptExecution** element to the [Re
4857
```
4958
3. Save and upload the file.
5059

51-
## Guidelines for using JavaScript
52-
53-
Follow these guidelines when you customize the interface of your application using JavaScript:
54-
55-
- Don't bind a click event on `<a>` HTML elements.
56-
- Don’t take a dependency on Azure AD B2C code or comments.
57-
- Don't change the order or hierarchy of Azure AD B2C HTML elements. Use an Azure AD B2C policy to control the order of the UI elements.
58-
- You can call any RESTful service with these considerations:
59-
- You may need to set your RESTful service CORS to allow client-side HTTP calls.
60-
- Make sure your RESTful service is secure and uses only the HTTPS protocol.
61-
- Don't use JavaScript directly to call Azure AD B2C endpoints.
62-
- You can embed your JavaScript or you can link to external JavaScript files. When using an external JavaScript file, make sure to use the absolute URL and not a relative URL.
63-
- JavaScript frameworks:
64-
- Azure AD B2C uses a specific version of jQuery. Don’t include another version of jQuery. Using more than one version on the same page causes issues.
65-
- Using RequireJS isn't supported.
66-
- Most JavaScript frameworks are not supported by Azure AD B2C.
67-
- Azure AD B2C settings can be read by calling `window.SETTINGS`, `window.CONTENT` objects, such as the current UI language. Don’t change the value of these objects.
68-
- To customize the Azure AD B2C error message, use localization in a policy.
69-
- If anything can be achieved by using a policy, generally it's the recommended way.
60+
[!INCLUDE [active-directory-b2c-javascript-guidelines](../../includes/active-directory-b2c-javascript-guidelines.md)]
7061

7162
## JavaScript samples
7263

0 commit comments

Comments
 (0)