Skip to content

Commit 85978aa

Browse files
committed
Map login_hint into CCS routing info, for now
1 parent b520b3e commit 85978aa

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)
@@ -1614,6 +1616,7 @@ def acquire_token_on_behalf_of(self, user_assertion, scopes, claims_challenge=No
16141616
claims=_merge_claims_challenge_and_capabilities(
16151617
self._client_capabilities, claims_challenge)),
16161618
headers=telemetry_context.generate_headers(),
1619+
# TBD: Expose a login_hint (or ccs_routing_hint) param for web app
16171620
**kwargs))
16181621
telemetry_context.update_telemetry(response)
16191622
return response

0 commit comments

Comments
 (0)