Skip to content

Commit ab30bd8

Browse files
Merge pull request #84 from MicrosoftDocs/main
Push changes to prod
2 parents 74dc1e3 + 8de579f commit ab30bd8

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

msal-python-conceptual/advanced/aad-b2c.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,17 @@ You would just need to update your HTML template to include new link to, for exa
9999

100100
## Resource Owner Password Credentials (ROPC) With B2C
101101

102-
There is still no API difference here between B2C and non-B2C scenario.
103-
The following content serves as a mini-tutorial.
102+
There exists no API difference between a B2C and non-B2C scenario. The following content serves as a mini-tutorial.
104103

105-
* In your AzureAD B2C tenant, create a new user flow and select **Sign in using ROPC**.
104+
* In your Azure AD B2C tenant, create a new user flow and select **Sign in using ROPC**.
106105
This will enable the ROPC user flow for your tenant.
107106
See [Configure the resource owner password credentials flow](/azure/active-directory-b2c/configure-ropc) for more details.
108107
* Once you create the MSAL instance with the authority which contains the ROPC user flow,
109108
the [`acquire_token_by_username_password(...)`](https://msal-python.readthedocs.io/en/latest/#msal.PublicClientApplication.acquire_token_by_username_password)
110109
would work as usual.
111110
* Limitations: This **only works for local accounts** (where you register with B2C using an email or username). This flow does not work if federating to any of the IdPs supported by B2C (Facebook, Google, etc...).
112-
* Normal caveats on ROPC flow still applies. Please see this [wiki page](https://github.com/AzureAD/microsoft-authentication-library-for-python/wiki/Username-Password-Authentication).
111+
112+
Microsoft [discourages the use of resource owner password credentials grant](https://news.microsoft.com/features/whats-solution-growing-problem-passwords-says-microsoft/). In most scenarios, more secure alternatives are available and recommended. This flow requires a very high degree of trust in the application, and carries risks that are not present in other flows. You should only use this flow when other more secure flows aren't viable. Learn more in the [username and password ](username-password-authentication.md) guidance.
113113

114114
## Caching with B2C in MSAL Python
115115

msal-python-conceptual/advanced/msal-python-adfs-support.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ The supported AD FS versions in this federated scenario are:
4141

4242
The following applies whether you connect directly to Active Directory Federation Services (AD FS) or through Active Directory.
4343

44-
When you acquire a token using `acquire_token_by_username_password`, MSAL Python gets the identity provider to contact based on the username. MSAL Python gets a [SAML 1.1 token](/azure/active-directory/develop/reference-saml-tokens) from the identity provider, which it then provides to Microsoft Entra which returns the JSON Web Token (JWT).
44+
When you acquire a token using `acquire_token_by_username_password`, MSAL Python gets the identity provider to contact based on the username. MSAL Python gets a [SAML 1.1 token](/azure/active-directory/develop/reference-saml-tokens) from the identity provider, which it then provides to Microsoft Entra which returns the JSON Web Token (JWT). We do not recommend the username and password flow as it presents security risks that are not present in other flows. For more information about why you want to avoid using this grant, see [why Microsoft is working to make passwords a thing of the past](https://news.microsoft.com/features/whats-solution-growing-problem-passwords-says-microsoft/).
45+
4546

4647
## Connecting directly to AD FS
4748

msal-python-conceptual/advanced/username-password-authentication.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ ms.reviewer: shermanouko, rayluo
1616

1717
The content below are applicable to [all MSAL libraries](/entra/msal), not just MSAL Python.
1818

19-
## Using username and password is not recommended
19+
## The username and password flow is not recommended
2020

21-
In general Microsoft does not advise customers to use it as it's less secure than the other flows. For more information about why you want to avoid using this grant you can read [why Microsoft is working to make passwords a thing of the past](https://news.microsoft.com/features/whats-solution-growing-problem-passwords-says-microsoft/).
21+
Microsoft recommends you do not use the username and password flow. In most scenarios, more secure alternatives are available and recommended. This flow requires a very high degree of trust in the application, and carries risks that are not present in other flows. You should only use this flow when other more secure flows aren't viable. For more information about why you want to avoid using this grant, see [why Microsoft is working to make passwords a thing of the past](https://news.microsoft.com/features/whats-solution-growing-problem-passwords-says-microsoft/).
2222

2323
## Constraints
2424

msal-python-conceptual/getting-started/acquiring-tokens.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ else:
122122

123123
### Username and password
124124

125-
It's also possible (but not recommended) to get a token with a [username and password](/entra/identity-platform/v2-oauth-ropc). MSAL Python provides the [`acquire_token_by_username_password`](/python/api/msal/msal.application.clientapplication#msal-application-clientapplication-acquire-token-by-username-password) method for this use case. It's not recommended because the application will be asking a user for their password directly, which is an insecure pattern.
125+
It's also possible (but not recommended) to get a token with a [username and password](/entra/identity-platform/v2-oauth-ropc). MSAL Python provides the [`acquire_token_by_username_password`](/python/api/msal/msal.application.clientapplication#msal-application-clientapplication-acquire-token-by-username-password) method for this use case.
126+
127+
Microsoft does not recommend the username and password flow because the application will be asking a user for their password directly, which is an insecure pattern. In most scenarios, there exist more secure flows that you can use. Learn more in the [username and password authentication flow](../advanced/username-password-authentication.md) guidance.
126128

127129
```python
128130
result = app.acquire_token_by_username_password(

0 commit comments

Comments
 (0)