-
GoalSuppose we don't have interest in supporting auth code flow in a docker container, and we just want to automatically fall back to device code flow. SymptomCurrently in MSAL-based CLI, running On the other hand, in ADAL-based CLI, if CLI fails to open a web browser, it throws try:
authority_url, _ = _get_authority_url(self.cli_ctx, tenant)
subscriptions = subscription_finder.find_through_authorization_code_flow(
tenant, self._ad_resource_uri, authority_url, auth_resource=auth_resource)
except RuntimeError:
use_device_code = True
logger.warning('Not able to launch a browser to log you in, falling back to device code...') I understand it is possible to throw an Exception at But I am not sure if this is a good choice and the correct usage of To Reproduce
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
My brain was not sharp when you brought this up in our ad-hoc meeting yesterday (mid-night time here in Redmond). Now I can answer them better.
Actually, we do have interest in supporting auth code flow as much as possible, even including some situations that were not previously considered possible. We will discuss more on those challenges in separate topics. Therefore, MSAL's
The "hang" is kind of intentional, to allow some potential hack to make it work, such as the In other words, MSAL's
Yes, it is! The main reason |
Beta Was this translation helpful? Give feedback.
My brain was not sharp when you brought this up in our ad-hoc meeting yesterday (mid-night time here in Redmond). Now I can answer them better.
Actually, we do have interest in supporting auth code flow as much as possible, even including some situations that were not previously considered possible. We will discuss more on those challenges in separate topics.
Therefore, MSAL's
acquire_token_interactive()
does not aggressively error out. That is also why you would observe the following symptom.