Skip to content

Conversation

wyunchi-ms
Copy link
Collaborator

@wyunchi-ms wyunchi-ms commented Nov 7, 2024

For those users who doesn't logined with azure cli, use interactive browse as a fallback way to get user access token.

PR Summary

PR Context

@wyunchi-ms wyunchi-ms force-pushed the wyunchi/fallback-to-InteractiveBrowser branch from 5d0072c to 0c3429c Compare November 7, 2024 13:02
{
_accessToken = await new AzureCliCredential()
_accessToken = await new ChainedTokenCredential(new AzureCliCredential(),
new InteractiveBrowserCredential(ApplicationId))
Copy link
Member

@daxian-dbw daxian-dbw Nov 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good idea, but we will need to do a lot more:

  1. What about scenarios where browser is not available? Like when user is using AIShell on a remote machine via SSH connection. How do we detect that and switch to "device code" login?
  2. The error handling (e.g. error messages to help with mitigation) regarding access token failures will need to be updated accordingly.
  3. Maybe we should not recommend /replace when AzCLI is not installed. And we shouldn't recommend /code post for AzCLI commands when it's not installed.

I think we should revisit this post public preview, and will definitely need to involve PMs to think about the scenarios when AzCLI is not installed.

@daxian-dbw
Copy link
Member

Superseded by #329

@daxian-dbw daxian-dbw closed this Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants