@@ -7,38 +7,40 @@ inheritances:
77- msal.application.ClientApplication
88summary : " Same as <xref:ClientApplication.__init__>,\n except that `client_credential`\
99 \ parameter shall remain `None`.\n\n > [!NOTE]\n > You may set enable_broker_on_windows\
10- \ to True.\n >\n > \n >\n > What is a broker, and why use it?\n >\n > \n >\n > A broker\
11- \ is a component installed on your device.\n >\n > Broker implicitly gives your device\
12- \ an identity. By using a broker,\n >\n > your device becomes a factor that can satisfy\
13- \ MFA (Multi-factor authentication).\n >\n > This factor would become mandatory\n \
14- >\n > if a tenant's admin enables a corresponding Conditional Access (CA) policy.\n \
15- >\n > The broker's presence allows Microsoft identity platform\n >\n > to have higher\
16- \ confidence that the tokens are being issued to your device,\n >\n > and that is\
17- \ more secure.\n >\n > \n >\n > An additional benefit of broker is,\n >\n > it runs as\
18- \ a long-lived process with your device's OS,\n >\n > and maintains its own cache,\n \
19- >\n > so that your broker-enabled apps (even a CLI)\n >\n > could automatically SSO\
20- \ from a previously established signed-in session.\n >\n > \n >\n > You shall only enable\
21- \ broker when your app:\n >\n > \n >\n > is running on supported platforms,\n >\n > and\
22- \ already registered their corresponding redirect_uri\n >\n > \n >\n > ms-appx-web://Microsoft.AAD.BrokerPlugin/your_client_id\n \
23- >\n > if your app is expected to run on Windows 10+\n >\n > \n >\n > installed broker\
24- \ dependency,\n >\n > e.g. pip install msal[broker]>=1.25,<2.\n >\n > \n >\n > tested\
25- \ with acquire_token_interactive() and acquire_token_silent().\n >\n > \n >\n > The\
26- \ fallback behaviors of MSAL Python's broker support\n >\n > \n >\n > MSAL will either\
27- \ error out, or silently fallback to non-broker flows.\n >\n > \n >\n > MSAL will ignore\
28- \ the enable_broker_... and bypass broker\n >\n > on those auth flows that are known\
29- \ to be NOT supported by broker.\n >\n > This includes ADFS, B2C, etc..\n >\n > For\
30- \ other \" could-use-broker\" scenarios, please see below.\n >\n > \n >\n > MSAL errors\
31- \ out when app developer opted-in to use broker\n >\n > but a direct dependency \" \
32- mid-tier\" package is not installed.\n >\n > Error message guides app developer to\
33- \ declare the correct dependency\n >\n > msal[broker].\n >\n > We error out here because\
34- \ the error is actionable to app developers.\n >\n > \n >\n > MSAL silently \" deactivates\" \
35- \ the broker and fallback to non-broker,\n >\n > when opted-in, dependency installed\
36- \ yet failed to initialize.\n >\n > We anticipate this would happen on a device whose\
37- \ OS is too old\n >\n > or the underlying broker component is somehow unavailable.\n \
38- >\n > There is not much an app developer or the end user can do here.\n >\n > Eventually,\
39- \ the conditional access policy shall\n >\n > force the user to switch to a different\
40- \ device.\n >\n > \n >\n > MSAL errors out when broker is opted in, installed, initialized,\n \
41- >\n > but subsequent token request(s) failed.\n >"
10+ \ and/or enable_broker_on_mac to True.\n >\n > \n >\n > What is a broker, and why use\
11+ \ it?\n >\n > \n >\n > A broker is a component installed on your device.\n >\n > Broker\
12+ \ implicitly gives your device an identity. By using a broker,\n >\n > your device\
13+ \ becomes a factor that can satisfy MFA (Multi-factor authentication).\n >\n > This\
14+ \ factor would become mandatory\n >\n > if a tenant's admin enables a corresponding\
15+ \ Conditional Access (CA) policy.\n >\n > The broker's presence allows Microsoft identity\
16+ \ platform\n >\n > to have higher confidence that the tokens are being issued to your\
17+ \ device,\n >\n > and that is more secure.\n >\n > \n >\n > An additional benefit of broker\
18+ \ is,\n >\n > it runs as a long-lived process with your device's OS,\n >\n > and maintains\
19+ \ its own cache,\n >\n > so that your broker-enabled apps (even a CLI)\n >\n > could\
20+ \ automatically SSO from a previously established signed-in session.\n >\n > \n >\n \
21+ > You shall only enable broker when your app:\n >\n > \n >\n > is running on supported\
22+ \ platforms,\n >\n > and already registered their corresponding redirect_uri\n >\n \
23+ > \n >\n > ms-appx-web://Microsoft.AAD.BrokerPlugin/your_client_id\n >\n > if your app\
24+ \ is expected to run on Windows 10+\n >\n > \n >\n > msauth.com.msauth.unsignedapp://auth\n \
25+ >\n > if your app is expected to run on Mac\n >\n > \n >\n > installed broker dependency,\n \
26+ >\n > e.g. pip install msal[broker]>=1.31,<2.\n >\n > \n >\n > tested with acquire_token_interactive()\
27+ \ and acquire_token_silent().\n >\n > \n >\n > The fallback behaviors of MSAL Python's\
28+ \ broker support\n >\n > \n >\n > MSAL will either error out, or silently fallback to\
29+ \ non-broker flows.\n >\n > \n >\n > MSAL will ignore the enable_broker_... and bypass\
30+ \ broker\n >\n > on those auth flows that are known to be NOT supported by broker.\n \
31+ >\n > This includes ADFS, B2C, etc..\n >\n > For other \" could-use-broker\" scenarios,\
32+ \ please see below.\n >\n > \n >\n > MSAL errors out when app developer opted-in to\
33+ \ use broker\n >\n > but a direct dependency \" mid-tier\" package is not installed.\n \
34+ >\n > Error message guides app developer to declare the correct dependency\n >\n >\
35+ \ msal[broker].\n >\n > We error out here because the error is actionable to app developers.\n \
36+ >\n > \n >\n > MSAL silently \" deactivates\" the broker and fallback to non-broker,\n \
37+ >\n > when opted-in, dependency installed yet failed to initialize.\n >\n > We anticipate\
38+ \ this would happen on a device whose OS is too old\n >\n > or the underlying broker\
39+ \ component is somehow unavailable.\n >\n > There is not much an app developer or\
40+ \ the end user can do here.\n >\n > Eventually, the conditional access policy shall\n \
41+ >\n > force the user to switch to a different device.\n >\n > \n >\n > MSAL errors out\
42+ \ when broker is opted in, installed, initialized,\n >\n > but subsequent token request(s)\
43+ \ failed.\n >"
4244constructor :
4345 syntax : PublicClientApplication(client_id, client_credential=None, **kwargs)
4446 parameters :
@@ -53,6 +55,16 @@ constructor:
5355 isRequired : true
5456 types :
5557 - <xref:boolean>
58+ - name : enable_broker_on_mac
59+ description : ' This setting is only effective if your app is running on Mac.
60+
61+ This parameter defaults to None, which means MSAL will not utilize a broker.
62+
63+
64+ New in MSAL Python 1.31.0.'
65+ isRequired : true
66+ types :
67+ - <xref:boolean>
5668 - name : client_id
5769 isRequired : true
5870 - name : client_credential
@@ -208,22 +220,14 @@ methods:
208220 types :
209221 - <xref:int>
210222 - name : parent_window_handle
211- description : ' Required if your app is running on Windows and opted in to use broker.
212-
213-
214- If your app is a GUI app,
215-
216- you are recommended to also provide its window handle,
217-
218- so that the sign in UI window will properly pop up on top of your window.
219-
220-
221- If your app is a console app (most Python scripts are console apps),
222-
223- you can use a placeholder value `msal.PublicClientApplication.CONSOLE_WINDOW_HANDLE`.
224-
225-
226- New in version 1.20.0.'
223+ description : " OPTIONAL.\n\n * If your app does not opt in to use broker, you do\
224+ \ not need to provide a `parent_window_handle` here. \n\n * If your app opts\
225+ \ in to use broker, `parent_window_handle` is required. \n\n * If your app\
226+ \ is a GUI app running on Windows or Mac system, you are required to also provide\
227+ \ its window handle, so that the sign-in window will pop up on top of your window.\
228+ \ \n\n * If your app is a console app running on Windows or Mac system, you\
229+ \ can use a placeholder `PublicClientApplication.CONSOLE_WINDOW_HANDLE`. \n\n \
230+ Most Python scripts are console apps.\n\n New in version 1.20.0."
227231 defaultValue : None
228232 types :
229233 - <xref:int>
0 commit comments