Microsoft Authentication Library For Python Versions Save

Microsoft Authentication Library (MSAL) for Python makes it easy to authenticate to Microsoft Entra ID. General docs are available here https://learn.microsoft.com/entra/msal/python/ Stable APIs are documented here https://msal-python.readthedocs.io. Questions can be asked on www.stackoverflow.com with tag "msal" + "python".

1.28.0

2 months ago
  • New feature: PublicClientApplication and ConfidentialClientApplication have a new oidc_authority parameter that can be used to specify authority of any generic OpenID Connect authority, typically the customized domain for CIAM. (#676, #678)
  • Dropping Python 2.7

1.27.0

3 months ago

What's Changed

Release Notes:

  • New feature: remove_tokens_for_client() will remove tokens acquired by acquire_token_for_client() (#640, #650, #666)
  • Performance: Throughput of token-cache-hit happy path is roughly 2x faster (#644)
  • Adjustment: MSAL no longer attempts to validate an ID token's time (#656, #657)
  • Adjustment: Bump upstream broker dependency to 0.14.x
  • Improvement: Better chance to remove accounts from broker (#651)
  • Improvement: Cleaner console output when the http local server is visited in https protocol (#546)
  • Improvement: Reduce a bare except clause (#667)

Note:

  • The previous preview features in previous 1.27.0b2 requires more beta testing, so they did NOT make it to 1.27.0. If you want to beta test 1.27.0b2, follow its own instruction.
  • MSAL Python 1.27 is the last version that still runs on Python 2.7

New Contributors

Full Changelog: https://github.com/AzureAD/microsoft-authentication-library-for-python/compare/1.26.0...1.27.0

1.27.0b1

5 months ago

This beta release is a preview for the broker-on-Mac support. You can install it by pip install msal==1.27.0b2. Please refer to this staged API Reference Doc for how to opt into this new feature.

(Note to MSAL maintenance team: The tag was accidentally named "...b1", while the actual version number was "...b2". This is not a problem when we eventually do it right when shipping the stable "1.27.0" in the future.)

1.26.0

5 months ago
  • Do not auto-detect region if app developer does not opt-in to region (#629, #630)
  • Support Proof-of-Possession (PoP) for Public Client based on broker (#511)

1.25.0

6 months ago
  • Deprecation: allow_broker will be replaced by enable_broker_on_windows (#613)
  • Bugfix: Device Code Flow (and Username Password Flow) and its subsequent silent request will automatically bypass broker and succeed. (#569)
  • Enhancement: acquire_token_interactive() supports running inside Docker
  • Observability: Successful token response will contain a new token_source field to indicate where the token was obtained from: identity_provider, cache or broker. (#610)

1.24.1

8 months ago

Includes minor adjustments on handling acquire_token_interactive(). The scope of the issue being addressed was limited to a short-lived sign-in attempt. The potential misuse vector complexity was high, therefore it is unlikely to be reproduced in standard usage scenarios; however, out of abundance of caution, this fix is shipped to align ourselves with Microsoft's policy of secure-by-default.

1.24.0b2

8 months ago

Experimental: Building on top of 1.24.0b1 and includes some adjustment on handling acquire_token_interactive().

1.24.0

8 months ago
  • Enhancement: There may be a new msal_telemetry key available in MSAL's acquire token response, currently observed when broker is enabled. Its content and format are opaque to caller. This telemetry blob allows participating apps to collect them via telemetry, and it may help future troubleshooting. (#575)
  • Enhancement: A new enable_pii_log parameter is added into ClientApplication constructor. When enabled, the broker component may include PII (Personal Identifiable Information) in logs. This may help troubleshooting. (#568, #590)

1.24.0b1

10 months ago

Experimental: Surface msal telemetry as a long opaque string (#575). This behavior is useful if your app has your own telemetry mechanism and wants to also collect MSAL's telemetry.

1.23.0

10 months ago

Improvements:

  • acquire_token_for_client() will automatically look up tokens from cache (#577). (But all other acquire_token_...() methods still require an explicit acquire_token_silent() in order to utilize token cache.)