@@ -1584,7 +1584,7 @@ def _acquire_token_silent_from_cache_and_possibly_refresh_it(
15841584 if self ._enable_broker and account and account .get ("account_source" ) in (
15851585 _GRANT_TYPE_BROKER , # Broker successfully established this account previously.
15861586 None , # Unknown data from older MSAL. Broker might still work.
1587- ) and (sys .platform != "linux" or not is_ssh_cert_or_pop_request ):
1587+ ) and (sys .platform in ( "win32" , "darwin" ) or not is_ssh_cert_or_pop_request ):
15881588 from .broker import _acquire_token_silently
15891589 response = _acquire_token_silently (
15901590 "https://{}/{}" .format (self .authority .instance , self .authority .tenant ),
@@ -1831,7 +1831,7 @@ def acquire_token_by_username_password(
18311831 """
18321832 claims = _merge_claims_challenge_and_capabilities (
18331833 self ._client_capabilities , claims_challenge )
1834- if self ._enable_broker and sys .platform != "linux" :
1834+ if self ._enable_broker and sys .platform in ( "win32" , "darwin" ) :
18351835 from .broker import _signin_silently
18361836 response = _signin_silently (
18371837 "https://{}/{}" .format (self .authority .instance , self .authority .tenant ),
@@ -2165,7 +2165,7 @@ def acquire_token_interactive(
21652165 return self ._acquire_token_by_cloud_shell (scopes , data = data )
21662166 claims = _merge_claims_challenge_and_capabilities (
21672167 self ._client_capabilities , claims_challenge )
2168- if self ._enable_broker and (sys .platform != "linux" or not is_ssh_cert_or_pop_request ):
2168+ if self ._enable_broker and (sys .platform in ( "win32" , "darwin" ) or not is_ssh_cert_or_pop_request ):
21692169 if parent_window_handle is None :
21702170 raise ValueError (
21712171 "parent_window_handle is required when you opted into using broker. "
0 commit comments