Skip to content

Commit 2b056ba

Browse files
authored
Merge pull request #409 from AzureAD/ccs-routing
Map login_hint into CCS routing info, too
2 parents e0a8700 + 85978aa commit 2b056ba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

msal/application.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ def _preferred_browser():
115115
class _ClientWithCcsRoutingInfo(Client):
116116

117117
def initiate_auth_code_flow(self, **kwargs):
118+
if kwargs.get("login_hint"): # eSTS could have utilized this as-is, but nope
119+
kwargs["X-AnchorMailbox"] = "UPN:%s" % kwargs["login_hint"]
118120
return super(_ClientWithCcsRoutingInfo, self).initiate_auth_code_flow(
119121
client_info=1, # To be used as CSS Routing info
120122
**kwargs)
@@ -1640,6 +1642,7 @@ def acquire_token_on_behalf_of(self, user_assertion, scopes, claims_challenge=No
16401642
claims=_merge_claims_challenge_and_capabilities(
16411643
self._client_capabilities, claims_challenge)),
16421644
headers=telemetry_context.generate_headers(),
1645+
# TBD: Expose a login_hint (or ccs_routing_hint) param for web app
16431646
**kwargs))
16441647
telemetry_context.update_telemetry(response)
16451648
return response

0 commit comments

Comments
 (0)