Skip to content

Commit cdf3a0b

Browse files
committed
Merge branch 'master' of https://github.com/MicrosoftDocs/azure-docs-pr into freshness51
2 parents 7b89036 + 0d53c33 commit cdf3a0b

File tree

853 files changed

+10082
-7570
lines changed

Some content is hidden

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

853 files changed

+10082
-7570
lines changed

.openpublishing.redirection.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,12 @@
251251
"redirect_url": "/azure/site-recovery/site-to-site-deprecation",
252252
"redirect_document_id": false
253253
},
254+
255+
{
256+
"source_path": "articles/site-recovery/site-to-site-deprecation.md",
257+
"redirect_url": "/azure/site-recovery/hyper-v-azure-tutorial",
258+
"redirect_document_id": false
259+
},
254260
{
255261
"source_path": "articles/machine-learning/service/quickstart-get-started.md",
256262
"redirect_url": "/azure/machine-learning/service/tutorial-1st-experiment-sdk-setup",
@@ -4776,6 +4782,26 @@
47764782
"redirect_url": "/azure/app-service-mobile",
47774783
"redirect_document_id": false
47784784
},
4785+
{
4786+
"source_path": "articles/application-gateway/application-gateway-backend-ssl.md",
4787+
"redirect_url": "/azure/application-gateway/ssl-overview",
4788+
"redirect_document_id": false
4789+
},
4790+
{
4791+
"source_path": "articles/application-gateway/tutorial-external-site-redirect-cli.md",
4792+
"redirect_url": "/azure/application-gateway/redirect-external-site-cli",
4793+
"redirect_document_id": false
4794+
},
4795+
{
4796+
"source_path": "articles/application-gateway/application-gateway-create-gateway-cli.md",
4797+
"redirect_url": "/azure/application-gateway/quick-create-cli",
4798+
"redirect_document_id": false
4799+
},
4800+
{
4801+
"source_path": "articles/application-gateway/application-gateway-ssl-cli.md",
4802+
"redirect_url": "/azure/application-gateway/tutorial-ssl-cli",
4803+
"redirect_document_id": false
4804+
},
47794805
{
47804806
"source_path": "articles/application-gateway/application-gateway-ssl-arm.md",
47814807
"redirect_url": "/azure/application-gateway/tutorial-ssl-powershell",
@@ -43710,6 +43736,11 @@
4371043736
"source_path": "articles/aks/virtual-kubelet.md",
4371143737
"redirect_url": "/azure/aks/concepts-scale#burst-to-azure-container-instances",
4371243738
"redirect_document_id": false
43739+
},
43740+
{
43741+
"source_path": "articles/healthcare-apis/configure-cosmos-db.md",
43742+
"redirect_url": "/azure/healthcare-apis/configure-database",
43743+
"redirect_document_id": false
4371343744
}
4371443745
]
4371543746
}

articles/active-directory-b2c/active-directory-b2c-devquickstarts-graph-dotnet.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,11 @@ Inspect the `B2CGraphClient.SendGraphPatchRequest()` method for details on how t
273273

274274
### Search users
275275

276-
You can search for users in your B2C tenant in following ways:
276+
You can search for users in your B2C tenant in the following ways:
277277

278278
* Reference the user's **object ID**.
279279
* Reference their sign-in identifer, the `signInNames` property.
280-
* Reference any of the valid OData parameters, e.g. givenName, surname, displayName etc.
280+
* Reference any of the valid OData parameters. For example, 'givenName', 'surname', 'displayName' etc.
281281

282282
Run one of the following commands to search for a user:
283283

articles/active-directory/develop/TOC.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,9 @@
241241
href: migrate-android-adal-msal.md
242242
- name: Migrate to MSAL.iOS and MacOS
243243
href: migrate-objc-adal-msal.md
244-
- name: Migrate to MSAL Java
244+
- name: Migrate to MSAL Python
245+
href: migrate-python-adal-msal.md
246+
- name: Migrate to MSAL for Java
245247
href: migrate-adal-msal-java.md
246248
- name: Migrate Xamarin apps using brokers from ADAL.NET to MSAL.NET
247249
href: msal-net-migration-ios-broker.md
@@ -452,7 +454,11 @@
452454
href: request-custom-claims.md
453455
- name: Redirect URI configuration
454456
href: redirect-uris-ios.md
455-
- name: MSAL Java
457+
- name: MSAL for Python
458+
items:
459+
- name: Token cache serialization
460+
href: msal-python-token-cache-serialization.md
461+
- name: MSAL for Java
456462
items:
457463
- name: Token cache serialization
458464
href: msal-java-token-cache-serialization.md

articles/active-directory/develop/active-directory-authentication-libraries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The Azure Active Directory Authentication Library (ADAL) v1.0 enables applicatio
4343
| JavaScript |ADAL.js |[GitHub](https://github.com/AzureAD/azure-activedirectory-library-for-js) |[GitHub](https://github.com/AzureAD/azure-activedirectory-library-for-js) |[Single-page app](https://github.com/Azure-Samples/active-directory-javascript-singlepageapp-dotnet-webapi) | |
4444
| iOS, macOS |ADAL |[GitHub](https://github.com/AzureAD/azure-activedirectory-library-for-objc/releases) |[GitHub](https://github.com/AzureAD/azure-activedirectory-library-for-objc) |[iOS app](https://docs.microsoft.com/azure/active-directory/active-directory-devquickstarts-ios) | [Reference](http://cocoadocs.org/docsets/ADAL/2.5.1/)|
4545
| Android |ADAL |[Maven](https://search.maven.org/search?q=g:com.microsoft.aad+AND+a:adal&core=gav) |[GitHub](https://github.com/AzureAD/azure-activedirectory-library-for-android) |[Android app](https://docs.microsoft.com/azure/active-directory/active-directory-devquickstarts-android) | [JavaDocs](https://javadoc.io/doc/com.microsoft.aad/adal/)|
46-
| Node.js |ADAL |[npm](https://www.npmjs.com/package/adal-node) |[GitHub](https://github.com/AzureAD/azure-activedirectory-library-for-nodejs) | [Node.js web app](https://github.com/Azure-Samples/active-directory-node-webapp-openidconnect)|[Reference](https://docs.microsoft.com/javascript/api/adal-node/?view=azure-node-latest) |
46+
| Node.js |ADAL |[npm](https://www.npmjs.com/package/adal-node) |[GitHub](https://github.com/AzureAD/azure-activedirectory-library-for-nodejs) | [Node.js web app](https://github.com/Azure-Samples/active-directory-node-webapp-openidconnect)|[Reference](https://docs.microsoft.com/javascript/api/overview/azure/activedirectory) |
4747
| Java |ADAL4J |[Maven](https://search.maven.org/#search%7Cga%7C1%7Ca%3Aadal4j%20g%3Acom.microsoft.azure) |[GitHub](https://github.com/AzureAD/azure-activedirectory-library-for-java) |[Java web app](https://github.com/Azure-Samples/active-directory-java-webapp-openidconnect) |[Reference](https://javadoc.io/doc/com.microsoft.azure/adal4j) |
4848
| Python |ADAL |[GitHub](https://github.com/AzureAD/azure-activedirectory-library-for-python) |[GitHub](https://github.com/AzureAD/azure-activedirectory-library-for-python) |[Python web app](https://github.com/Azure-Samples/active-directory-python-webapp-graphapi) |[Reference](https://adal-python.readthedocs.io/) |
4949

articles/active-directory/develop/authentication-scenarios.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ This attribute causes ASP.NET to check for the presence of a session cookie cont
145145
### How a web app delegates sign-in to Azure AD and obtains a token
146146

147147
User authentication happens via the browser. The OpenID protocol uses standard HTTP protocol messages.
148-
- The web app sends an HTTP 202 (redirect) to the browser to use Azure AD.
148+
- The web app sends an HTTP 203 (redirect) to the browser to use Azure AD.
149149
- When the user is authenticated, Azure AD sends the token to the web app by using a redirect through the browser.
150150
- The redirect is provided by the web app in the form of a redirect URI. This redirect URI is registered with the Azure AD application object. There can be several redirect URIs because the application may be deployed at several URLs. So the web app will also need to specify the redirect URi to use.
151151
- Azure AD verifies that the redirect URI sent by the web app is one of the registered redirect URIs for the app.
@@ -156,7 +156,7 @@ The flow described above applies, with slight differences, to desktop and mobile
156156

157157
Desktop and mobile applications can use an embedded Web control, or a system browser, for authentication. The following diagram shows how a Desktop or mobile app uses the Microsoft authentication library (MSAL) to acquire access tokens and call web APIs.
158158

159-
![Desktop app how it appears to be](media/authentication-scenarios/web-app-how-it-appears-to-be.png)
159+
![Desktop app how it appears to be](media/authentication-scenarios/desktop-app-how-it-appears-to-be.png)
160160

161161
MSAL uses a browser to get tokens, and as with web apps, delegates authentication to Azure AD.
162162

59.6 KB
Loading

articles/active-directory/develop/migrate-adal-msal-java.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
title: ADAL to MSAL migration guide for Java- Microsoft identity platform | Azure
2+
title: ADAL to MSAL migration guide for Java | Azure
3+
titleSuffix: Microsoft identity platform
34
description: Learn how to migrate your Azure Active Directory Authentication Library (ADAL) Java app to the Microsoft Authentication Library (MSAL).
45
services: active-directory
56
author: sangonzal
@@ -64,7 +65,7 @@ The following table shows how ADAL4J functions map to the new MSAL4J functions:
6465

6566
ADAL4J manipulated users. Although a user represents a single human or software agent, it can have one or more accounts in the Microsoft identity system. For example, a user may have several Azure AD, Azure AD B2C, or Microsoft personal accounts.
6667

67-
MSAL4J defines the concept of Account via the `IAccount` interface. This is a breaking change from ADAL4J, but it is a good one because it captures the fact that that the same user can have several accounts, and perhaps even in different Azure AD directories. MSAL4J provides better information in guest scenarios because home account information is provided.
68+
MSAL4J defines the concept of Account via the `IAccount` interface. This is a breaking change from ADAL4J, but it is a good one because it captures the fact that the same user can have several accounts, and perhaps even in different Azure AD directories. MSAL4J provides better information in guest scenarios because home account information is provided.
6869

6970
## Cache persistence
7071

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
title: ADAL to MSAL migration guide for Python | Azure
3+
description: Learn how to migrate your Azure Active Directory Authentication Library (ADAL) Python app to the Microsoft Authentication Library (MSAL) for Python.
4+
services: active-directory
5+
titleSuffix: Microsoft identity platform
6+
author: rayluo
7+
manager: henrikm
8+
editor: twhitney
9+
10+
ms.service: active-directory
11+
ms.subservice: develop
12+
ms.devlang: na
13+
ms.topic: conceptual
14+
ms.tgt_pltfrm: Python
15+
ms.workload: identity
16+
ms.date: 11/11/2019
17+
ms.author: rayluo
18+
ms.reviewer:
19+
ms.custom: aaddev
20+
#Customer intent: As a Python application developer, I want to learn how to migrate my v1 ADAL app to v2 MSAL.
21+
ms.collection: M365-identity-device-management
22+
---
23+
24+
# ADAL to MSAL migration guide for Python
25+
26+
This article highlights changes you need to make to migrate an app that uses the Azure Active Directory Authentication Library (ADAL) to use the Microsoft Authentication Library (MSAL).
27+
28+
## Difference highlights
29+
30+
ADAL works with the Azure Active Directory v1.0 endpoint. The Microsoft Authentication Library (MSAL) works with the Microsoft identity platform--formerly known as the Azure Active Directory v2.0 endpoint. The Microsoft identity platform differs from Azure Active Directory v1.0 in that it:
31+
32+
Supports:
33+
- Work and school accounts (Azure AD provisioned accounts)
34+
- Personal accounts (such as Outlook.com or Hotmail.com)
35+
- Your customers who bring their own email or social identity (such as LinkedIn, Facebook, Google) via the Azure AD B2C offering
36+
37+
- Is standards compatible with:
38+
- OAuth v2.0
39+
- OpenID Connect (OIDC)
40+
41+
See [What's different about the Microsoft identity platform (v2.0) endpoint?](https://docs.microsoft.com/azure/active-directory/develop/azure-ad-endpoint-comparison) for more details.
42+
43+
### Scopes not resources
44+
45+
ADAL Python acquires tokens for resources, but MSAL Python acquires tokens for scopes. The API surface in MSAL Python does not have resource parameter anymore. You would need to provide scopes as a list of strings that declare the desired permissions and resources that are requested. To see some example of scopes, see [Microsoft Graph's scopes](https://docs.microsoft.com/graph/permissions-reference).
46+
47+
### Error handling
48+
49+
Azure Active Directory Authentication Library (ADAL) for Python uses the exception `AdalError` to indicate that there's been a problem. MSAL for Python typically uses error codes, instead. For more information, see [MSAL for Python error handling](msal-handling-exceptions.md#msal-for-python-error-handling).
50+
51+
### API changes
52+
53+
The following table lists an API in ADAL for Python, and the one to use in its place in MSAL for Python:
54+
55+
| ADAL for Python API | MSAL for Python API |
56+
| ------------------- | ---------------------------------- |
57+
| [AuthenticationContext](https://adal-python.readthedocs.io/en/latest/#adal.AuthenticationContext) | [PublicClientApplication or ConfidentialClientApplication](https://msal-python.readthedocs.io/en/latest/#msal.ClientApplication.__init__) |
58+
| N/A | [get_authorization_request_url()](https://msal-python.readthedocs.io/en/latest/#msal.ClientApplication.get_authorization_request_url) |
59+
| [acquire_token_with_authorization_code()](https://adal-python.readthedocs.io/en/latest/#adal.AuthenticationContext.acquire_token_with_authorization_code) | [acquire_token_by_authorization_code()](https://msal-python.readthedocs.io/en/latest/#msal.ClientApplication.acquire_token_by_authorization_code) |
60+
| [acquire_token()](https://adal-python.readthedocs.io/en/latest/#adal.AuthenticationContext.acquire_token) | [acquire_token_silent()](https://msal-python.readthedocs.io/en/latest/#msal.ClientApplication.acquire_token_silent) |
61+
| [acquire_token_with_refresh_token()](https://adal-python.readthedocs.io/en/latest/#adal.AuthenticationContext.acquire_token_with_refresh_token) | N/A (See the section above) |
62+
| [acquire_user_code()](https://adal-python.readthedocs.io/en/latest/#adal.AuthenticationContext.acquire_user_code) | [initiate_device_flow()](https://msal-python.readthedocs.io/en/latest/#msal.PublicClientApplication.initiate_device_flow) |
63+
| [acquire_token_with_device_code()](https://adal-python.readthedocs.io/en/latest/#adal.AuthenticationContext.acquire_token_with_device_code) and [cancel_request_to_get_token_with_device_code()](https://adal-python.readthedocs.io/en/latest/#adal.AuthenticationContext.cancel_request_to_get_token_with_device_code) | [acquire_token_by_device_flow()](https://msal-python.readthedocs.io/en/latest/#msal.PublicClientApplication.acquire_token_by_device_flow) |
64+
| [acquire_token_with_username_password()](https://adal-python.readthedocs.io/en/latest/#adal.AuthenticationContext.acquire_token_with_username_password) | [acquire_token_by_username_password()](https://msal-python.readthedocs.io/en/latest/#msal.PublicClientApplication.acquire_token_by_username_password) |
65+
| [acquire_token_with_client_credentials()](https://adal-python.readthedocs.io/en/latest/#adal.AuthenticationContext.acquire_token_with_client_credentials) and [acquire_token_with_client_certificate()](https://adal-python.readthedocs.io/en/latest/#adal.AuthenticationContext.acquire_token_with_client_certificate) | [acquire_token_for_client()](https://msal-python.readthedocs.io/en/latest/#msal.ConfidentialClientApplication.acquire_token_for_client) |
66+
| N/A | [acquire_token_on_behalf_of()](https://msal-python.readthedocs.io/en/latest/#msal.ConfidentialClientApplication.acquire_token_on_behalf_of) |
67+
| [TokenCache()](https://adal-python.readthedocs.io/en/latest/#adal.TokenCache) | [SerializableTokenCache()](https://msal-python.readthedocs.io/en/latest/#msal.SerializableTokenCache) |
68+
| N/A | Cache with persistence, available from [MSAL Extensions](https://github.com/marstr/original-microsoft-authentication-extensions-for-python) |
69+
70+
## Migrate existing refresh tokens for MSAL Python
71+
72+
The Microsoft authentication library (MSAL) abstracts the concept of refresh tokens. MSAL Python provides an in-memory token cache by default so that you don't need to store, lookup, or update refresh tokens. Users will also see fewer sign-in prompts because refresh tokens can usually be updated without user intervention. For more information about the token cache, see [Custom token cache serialization in MSAL for Python](msal-python-token-cache-serialization.md).
73+
74+
The following code will help you migrate your refresh tokens managed by another OAuth2 library (including but not limited to ADAL Python) to be managed by MSAL for Python. One reason for migrating those refresh tokens is to prevent existing users from needing to sign in again when you migrate your app to MSAL for Python.
75+
76+
The method for migrating a refresh token is to use MSAL for Python to acquire a new access token using the previous refresh token. When the new refresh token is returned, MSAL for Python will store it in the cache. Here is an example of how to do it:
77+
78+
```python
79+
from msal import PublicClientApplication
80+
81+
def get_preexisting_rt_and_their_scopes_from_elsewhere(...):
82+
raise NotImplementedError("You will need to implement this by yourself")
83+
84+
app = PublicClientApplication(..., token_cache=...)
85+
86+
for old_rt, old_scope in get_preexisting_rt_and_their_scopes_from_elsewhere(...):
87+
# Assuming the old scope could be a space-delimited string.
88+
# MSAL expects a list, like ["scope1", "scope2"].
89+
scopes = old_scope.split()
90+
# If your old refresh token came from ADAL for Python, which uses a resource rather than a scope,
91+
# you need to convert your v1 resource into v2 scopes
92+
# See https://docs.microsoft.com/azure/active-directory/develop/azure-ad-endpoint-comparison#scopes-not-resources
93+
# You may be able to append "/.default" to your v1 resource to form a scope
94+
# See https://docs.microsoft.com/azure/active-directory/develop/v2-permissions-and-consent#the-default-scope
95+
96+
result = app.client.obtain_token_by_refresh_token(old_rt, scope=scopes)
97+
# When this call returns the new token(s), a new refresh token is issued by the Microsoft identity platform and MSAL for Python
98+
# stores it in the token cache.
99+
```
100+
101+
## Next steps
102+
103+
For more information, refer to [v1.0 and v2.0 comparison](active-directory-v2-compare.md).

0 commit comments

Comments
 (0)