@@ -4,34 +4,38 @@ name: PublicClientApplication
44fullName : msal.application.PublicClientApplication
55module : msal.application
66summary : " Same as <xref:ClientApplication.__init__>,\n except that `client_credential`\
7- \ parameter shall remain `None`.\n\n > [!NOTE]\n > You may set enable_broker_on_windows\
8- \ and/or enable_broker_on_mac to True.\n >\n > \n >\n > What is a broker, and why use\
9- \ it?\n >\n > \n >\n > A broker is a component installed on your device.\n >\n > Broker\
10- \ implicitly gives your device an identity. By using a broker,\n >\n > your device\
11- \ becomes a factor that can satisfy MFA (Multi-factor authentication).\n >\n > This\
12- \ factor would become mandatory\n >\n > if a tenant's admin enables a corresponding\
13- \ Conditional Access (CA) policy.\n >\n > The broker's presence allows Microsoft identity\
14- \ platform\n >\n > to have higher confidence that the tokens are being issued to your\
15- \ device,\n >\n > and that is more secure.\n >\n > \n >\n > An additional benefit of broker\
16- \ is,\n >\n > it runs as a long-lived process with your device's OS,\n >\n > and maintains\
7+ \ parameter shall remain `None`.\n\n > [!NOTE]\n > What is a broker, and why use it?\n \
8+ >\n > \n >\n > A broker is a component installed on your device.\n >\n > Broker implicitly\
9+ \ gives your device an identity. By using a broker,\n >\n > your device becomes a\
10+ \ factor that can satisfy MFA (Multi-factor authentication).\n >\n > This factor would\
11+ \ become mandatory\n >\n > if a tenant's admin enables a corresponding Conditional\
12+ \ Access (CA) policy.\n >\n > The broker's presence allows Microsoft identity platform\n \
13+ >\n > to have higher confidence that the tokens are being issued to your device,\n \
14+ >\n > and that is more secure.\n >\n > \n >\n > An additional benefit of broker is,\n \
15+ >\n > it runs as a long-lived process with your device's OS,\n >\n > and maintains\
1716 \ its own cache,\n >\n > so that your broker-enabled apps (even a CLI)\n >\n > could\
1817 \ automatically SSO from a previously established signed-in session.\n >\n > \n >\n \
19- > You shall only enable broker when your app:\n >\n > \n >\n > is running on supported\
20- \ platforms,\n >\n > and already registered their corresponding redirect_uri\n >\n \
21- > \n >\n > ms-appx-web://Microsoft.AAD.BrokerPlugin/your_client_id\n >\n > if your app\
22- \ is expected to run on Windows 10+\n >\n > \n >\n > msauth.com.msauth.unsignedapp://auth\n \
23- >\n > if your app is expected to run on Mac\n >\n > \n >\n > installed broker dependency,\n \
24- >\n > e.g. pip install msal[broker]>=1.31,<2.\n >\n > \n >\n > tested with acquire_token_interactive()\
25- \ and acquire_token_silent().\n >\n > \n >\n > The fallback behaviors of MSAL Python's\
26- \ broker support\n >\n > \n >\n > MSAL will either error out, or silently fallback to\
27- \ non-broker flows.\n >\n > \n >\n > MSAL will ignore the enable_broker_... and bypass\
28- \ broker\n >\n > on those auth flows that are known to be NOT supported by broker.\n \
29- >\n > This includes ADFS, B2C, etc..\n >\n > For other \" could-use-broker\" scenarios,\
30- \ please see below.\n >\n > \n >\n > MSAL errors out when app developer opted-in to\
31- \ use broker\n >\n > but a direct dependency \" mid-tier\" package is not installed.\n \
32- >\n > Error message guides app developer to declare the correct dependency\n >\n >\
33- \ msal[broker].\n >\n > We error out here because the error is actionable to app developers.\n \
34- >\n > \n >\n > MSAL silently \" deactivates\" the broker and fallback to non-broker,\n \
18+ > How to opt in to use broker?\n >\n > \n >\n > You can set any combination of the following\
19+ \ opt-in parameters to true:\n >\n > \n >\n > \n >\n > \n >\n > \n >\n > \n >\n > \n >\n > \n \
20+ >\n > Opt-in flag\n >\n > \n >\n > If app will run on\n >\n > \n >\n > App has registered\
21+ \ this as a Desktop platform redirect URI in Azure Portal\n >\n > \n >\n > enable_broker_on_windows\n \
22+ >\n > \n >\n > Windows 10+\n >\n > \n >\n > ms-appx-web://Microsoft.AAD.BrokerPlugin/your_client_id\n \
23+ >\n > \n >\n > enable_broker_on_wsl\n >\n > \n >\n > WSL\n >\n > \n >\n > ms-appx-web://Microsoft.AAD.BrokerPlugin/your_client_id\n \
24+ >\n > \n >\n > enable_broker_on_mac\n >\n > \n >\n > Mac with Company Portal installed\n \
25+ >\n > \n >\n > msauth.com.msauth.unsignedapp://auth\n >\n > \n >\n > enable_broker_on_linux\n \
26+ >\n > \n >\n > Linux with Intune installed\n >\n > \n >\n > https://login.microsoftonline.com/common/oauth2/nativeclient\
27+ \ (MUST be enabled)\n >\n > \n >\n > Install broker dependency,\n >\n > e.g. pip install\
28+ \ msal[broker]>=1.33,<2.\n >\n > \n >\n > Test with acquire_token_interactive() and\
29+ \ acquire_token_silent().\n >\n > \n >\n > The fallback behaviors of MSAL Python's broker\
30+ \ support\n >\n > \n >\n > MSAL will either error out, or silently fallback to non-broker\
31+ \ flows.\n >\n > \n >\n > MSAL will ignore the enable_broker_... and bypass broker\n \
32+ >\n > on those auth flows that are known to be NOT supported by broker.\n >\n > This\
33+ \ includes ADFS, B2C, etc..\n >\n > For other \" could-use-broker\" scenarios, please\
34+ \ see below.\n >\n > \n >\n > MSAL errors out when app developer opted-in to use broker\n \
35+ >\n > but a direct dependency \" mid-tier\" package is not installed.\n >\n > Error\
36+ \ message guides app developer to declare the correct dependency\n >\n > msal[broker].\n \
37+ >\n > We error out here because the error is actionable to app developers.\n >\n >\
38+ \ \n >\n > MSAL silently \" deactivates\" the broker and fallback to non-broker,\n \
3539 >\n > when opted-in, dependency installed yet failed to initialize.\n >\n > We anticipate\
3640 \ this would happen on a device whose OS is too old\n >\n > or the underlying broker\
3741 \ component is somehow unavailable.\n >\n > There is not much an app developer or\
@@ -41,7 +45,8 @@ summary: "Same as <xref:ClientApplication.__init__>,\nexcept that `client_creden
4145 \ failed.\n >"
4246constructor :
4347 syntax : PublicClientApplication(client_id, client_credential=None, *, enable_broker_on_windows=None,
44- enable_broker_on_mac=None, **kwargs)
48+ enable_broker_on_mac=None, enable_broker_on_linux=None, enable_broker_on_wsl=None,
49+ **kwargs)
4550 parameters :
4651 - name : enable_broker_on_windows
4752 description : ' This setting is only effective if your app is running on Windows
@@ -64,6 +69,27 @@ constructor:
6469 isRequired : true
6570 types :
6671 - <xref:boolean>
72+ - name : enable_broker_on_linux
73+ description : ' This setting is only effective if your app is running on Linux,
74+ including WSL.
75+
76+ This parameter defaults to None, which means MSAL will not utilize a broker.
77+
78+
79+ New in MSAL Python 1.33.0.'
80+ isRequired : true
81+ types :
82+ - <xref:boolean>
83+ - name : enable_broker_on_wsl
84+ description : ' This setting is only effective if your app is running on WSL.
85+
86+ This parameter defaults to None, which means MSAL will not utilize a broker.
87+
88+
89+ New in MSAL Python 1.33.0.'
90+ isRequired : true
91+ types :
92+ - <xref:boolean>
6793 - name : client_id
6894 isRequired : true
6995 - name : client_credential
@@ -73,6 +99,10 @@ constructor:
7399 defaultValue : None
74100 - name : enable_broker_on_mac
75101 defaultValue : None
102+ - name : enable_broker_on_linux
103+ defaultValue : None
104+ - name : enable_broker_on_wsl
105+ defaultValue : None
76106methods :
77107- uid : msal.application.PublicClientApplication.acquire_token_by_device_flow
78108 name : acquire_token_by_device_flow
@@ -268,13 +298,16 @@ methods:
268298 summary : ' Initiate a Device Flow instance,
269299
270300 which will be used in <xref:msal.application.PublicClientApplication.acquire_token_by_device_flow>.'
271- signature : initiate_device_flow(scopes=None, **kwargs)
301+ signature : initiate_device_flow(scopes=None, *, claims_challenge=None, * *kwargs)
272302 parameters :
273303 - name : scopes
274304 description : Scopes requested to access a protected API (a resource).
275305 defaultValue : None
276306 types :
277307 - <xref:list>[<xref:str>]
308+ keywordOnlyParameters :
309+ - name : claims_challenge
310+ defaultValue : None
278311 return :
279312 description : " A dict representing a newly created Device Flow object.\n\n * A successful\
280313 \ response would contain \" user_code\" key, among others \n\n * an error response\
0 commit comments