microsoft-agents-authentication-msal 0.5.0.dev19__py3-none-any.whl → 0.6.0.dev4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,6 +19,8 @@ from cryptography.x509 import load_pem_x509_certificate
19
19
  from cryptography.hazmat.backends import default_backend
20
20
  from cryptography.hazmat.primitives import hashes
21
21
 
22
+ from microsoft_agents.activity._utils import _DeferredString
23
+
22
24
  from microsoft_agents.hosting.core import (
23
25
  AuthTypes,
24
26
  AccessTokenProviderBase,
@@ -28,18 +30,6 @@ from microsoft_agents.hosting.core import (
28
30
  logger = logging.getLogger(__name__)
29
31
 
30
32
 
31
- # this is deferred because jwt.decode is expensive and we don't want to do it unless we
32
- # have logging.DEBUG enabled
33
- class _DeferredLogOfBlueprintId:
34
- def __init__(self, jwt_token: str):
35
- self.jwt_token = jwt_token
36
-
37
- def __str__(self):
38
- payload = jwt.decode(self.jwt_token, options={"verify_signature": False})
39
- agentic_blueprint_id = payload.get("xms_par_app_azp")
40
- return f"Agentic blueprint id: {agentic_blueprint_id}"
41
-
42
-
43
33
  async def _async_acquire_token_for_client(msal_auth_client, *args, **kwargs):
44
34
  """MSAL in Python does not support async, so we use asyncio.to_thread to run it in
45
35
  a separate thread and avoid blocking the event loop
@@ -328,7 +318,14 @@ class MsalAuth(AccessTokenProviderBase):
328
318
  )
329
319
  raise ValueError(f"Failed to acquire token. {str(agentic_instance_token)}")
330
320
 
331
- logger.debug(_DeferredLogOfBlueprintId(token))
321
+ logger.debug(
322
+ "Agentic blueprint id: %s",
323
+ _DeferredString(
324
+ lambda: jwt.decode(token, options={"verify_signature": False}).get(
325
+ "xms_par_app_azp"
326
+ )
327
+ ),
328
+ )
332
329
 
333
330
  return agentic_instance_token["access_token"], agent_token_result
334
331
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: microsoft-agents-authentication-msal
3
- Version: 0.5.0.dev19
3
+ Version: 0.6.0.dev4
4
4
  Summary: A msal-based authentication library for Microsoft Agents
5
5
  Author: Microsoft Corporation
6
6
  License-Expression: MIT
@@ -15,7 +15,7 @@ Classifier: Operating System :: OS Independent
15
15
  Requires-Python: >=3.10
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
- Requires-Dist: microsoft-agents-hosting-core==0.5.0.dev19
18
+ Requires-Dist: microsoft-agents-hosting-core==0.6.0.dev4
19
19
  Requires-Dist: msal>=1.31.1
20
20
  Requires-Dist: requests>=2.32.3
21
21
  Requires-Dist: cryptography>=44.0.0
@@ -32,6 +32,24 @@ Provides secure authentication for your agents using Microsoft Authentication Li
32
32
 
33
33
  This library is part of the **Microsoft 365 Agents SDK for Python** - a comprehensive framework for building enterprise-grade conversational AI agents. The SDK enables developers to create intelligent agents that work across multiple platforms including Microsoft Teams, M365 Copilot, Copilot Studio, and web chat, with support for third-party integrations like Slack, Facebook Messenger, and Twilio.
34
34
 
35
+ ## Release Notes
36
+ <table style="width:100%">
37
+ <tr>
38
+ <th style="width:20%">Version</th>
39
+ <th style="width:20%">Date</th>
40
+ <th style="width:60%">Release Notes</th>
41
+ </tr>
42
+ <tr>
43
+ <td>0.5.0</td>
44
+ <td>2025-10-22</td>
45
+ <td>
46
+ <a href="https://github.com/microsoft/Agents-for-python/blob/main/changelog.md">
47
+ 0.5.0 Release Notes
48
+ </a>
49
+ </td>
50
+ </tr>
51
+ </table>
52
+
35
53
  ## Packages Overview
36
54
 
37
55
  We offer the following PyPI packages to create conversational experiences based on Agents:
@@ -0,0 +1,8 @@
1
+ microsoft_agents/authentication/msal/__init__.py,sha256=hjPpakL4zyqeCTEBOUCcHaRnSpG80q-L0csG5HMalYI,151
2
+ microsoft_agents/authentication/msal/msal_auth.py,sha256=83N_vWtIlcY6zuo1Wsnyf5fFEU2hDqyi3W0UHVwCmfY,16447
3
+ microsoft_agents/authentication/msal/msal_connection_manager.py,sha256=v7o0ONzjId1G6Ta7IjHc1NtSeM3NWH4t7YilrwJzvYg,5713
4
+ microsoft_agents_authentication_msal-0.6.0.dev4.dist-info/licenses/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
5
+ microsoft_agents_authentication_msal-0.6.0.dev4.dist-info/METADATA,sha256=jCWQKi1_160mkaAGxGRBOD42HiEAk7EquCc7Ed4rspw,8373
6
+ microsoft_agents_authentication_msal-0.6.0.dev4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
+ microsoft_agents_authentication_msal-0.6.0.dev4.dist-info/top_level.txt,sha256=lWKcT4v6fTA_NgsuHdNvuMjSrkiBMXohn64ApY7Xi8A,17
8
+ microsoft_agents_authentication_msal-0.6.0.dev4.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- microsoft_agents/authentication/msal/__init__.py,sha256=hjPpakL4zyqeCTEBOUCcHaRnSpG80q-L0csG5HMalYI,151
2
- microsoft_agents/authentication/msal/msal_auth.py,sha256=6SHaLgq8yEK9sLY8ab5qmgowjcUpI_AGkS5uuDnEb-Q,16642
3
- microsoft_agents/authentication/msal/msal_connection_manager.py,sha256=v7o0ONzjId1G6Ta7IjHc1NtSeM3NWH4t7YilrwJzvYg,5713
4
- microsoft_agents_authentication_msal-0.5.0.dev19.dist-info/licenses/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
5
- microsoft_agents_authentication_msal-0.5.0.dev19.dist-info/METADATA,sha256=d_tgP1mcZe55QsPTW_3riankk_Y2fYRAxCQxFiTqzX4,7983
6
- microsoft_agents_authentication_msal-0.5.0.dev19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
- microsoft_agents_authentication_msal-0.5.0.dev19.dist-info/top_level.txt,sha256=lWKcT4v6fTA_NgsuHdNvuMjSrkiBMXohn64ApY7Xi8A,17
8
- microsoft_agents_authentication_msal-0.5.0.dev19.dist-info/RECORD,,