Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Acquiring Tokens with username and password

Navya Canumalla edited this page May 18, 2018 · 1 revision

ADAL Python supports in the user name and password flow in public clients. In general Microsoft does not advice customers to use it as it's less secure than the other flows, and it is not compatible with conditional access(because if the resource requires conditional access, the call to acquire token will just fail, given that this is not an interactive flow (the STS does not have an opportunity to present a dialog to the user to tell him/her that s/he needs to do multiple factor authentication).

For more information about why you want to avoid using this grant, you can read the following article which explains why Microsoft is working to make passwords a thing of the past.

You can get a token with a username and password by calling the acquire_token_with_username_password method.