@@ -819,11 +819,14 @@ def _decide_broker(self, allow_broker, enable_pii_log):
819819 if (
820820 self ._enable_broker
821821 and sys .platform == "darwin"
822- and platform .machine () in ( "x86_64" , "i386" )
822+ and platform .machine () != "arm64"
823823 ):
824824 # Broker on macOS is supported only on Apple Silicon (arm64).
825- # Intel Macs are excluded by product policy, regardless of whether
826- # a broker is actually installed on the device.
825+ # Anything else on darwin -- Intel Macs, and an x86_64 Python
826+ # running under Rosetta -- is excluded by product policy,
827+ # regardless of whether a broker is installed on the device.
828+ # This is an allowlist so that an unrecognized architecture
829+ # errs on the side of not using the broker.
827830 self ._enable_broker = False
828831 logger .warning (
829832 "Broker is not supported on Intel-based Macs. "
@@ -2180,17 +2183,17 @@ def __init__(
21802183
21812184 1. You can set any combination of the following opt-in parameters to true:
21822185
2183- +--------------------------+-----------------------------------+------------------------------------------------------------------------------------+
2184- | Opt-in flag | If app will run on | App has registered this as a Desktop platform redirect URI in Azure Portal |
2185- +==========================+===================================+====================================================================================+
2186- | enable_broker_on_windows | Windows 10+ | ms-appx-web://Microsoft.AAD.BrokerPlugin/your_client_id |
2187- +--------------------------+-----------------------------------+------------------------------------------------------------------------------------+
2188- | enable_broker_on_wsl | WSL | ms-appx-web://Microsoft.AAD.BrokerPlugin/your_client_id |
2189- +--------------------------+-----------------------------------+------------------------------------------------------------------------------------+
2190- | enable_broker_on_mac | Apple Silicon Mac, Company Portal | msauth.com.msauth.unsignedapp://auth |
2191- +--------------------------+-----------------------------------+------------------------------------------------------------------------------------+
2192- | enable_broker_on_linux | Linux with Intune installed | ``https://login.microsoftonline.com/common/oauth2/nativeclient`` (MUST be enabled) |
2193- +--------------------------+-----------------------------------+------------------------------------------------------------------------------------+
2186+ +--------------------------+------------------------------------------------- +------------------------------------------------------------------------------------+
2187+ | Opt-in flag | If app will run on | App has registered this as a Desktop platform redirect URI in Azure Portal |
2188+ +==========================+================================================= +====================================================================================+
2189+ | enable_broker_on_windows | Windows 10+ | ms-appx-web://Microsoft.AAD.BrokerPlugin/your_client_id |
2190+ +--------------------------+------------------------------------------------- +------------------------------------------------------------------------------------+
2191+ | enable_broker_on_wsl | WSL | ms-appx-web://Microsoft.AAD.BrokerPlugin/your_client_id |
2192+ +--------------------------+------------------------------------------------- +------------------------------------------------------------------------------------+
2193+ | enable_broker_on_mac | Apple Silicon Mac with Company Portal installed | msauth.com.msauth.unsignedapp://auth |
2194+ +--------------------------+------------------------------------------------- +------------------------------------------------------------------------------------+
2195+ | enable_broker_on_linux | Linux with Intune installed | ``https://login.microsoftonline.com/common/oauth2/nativeclient`` (MUST be enabled) |
2196+ +--------------------------+------------------------------------------------- +------------------------------------------------------------------------------------+
21942197
21952198 2. Install broker dependency,
21962199 e.g. ``pip install msal[broker]>=1.33,<2``.
0 commit comments