Skip to content

New Streamlined Authentication flow in Azure ML ‐ Remote extension

Shantnu Suman edited this page Jan 12, 2024 · 18 revisions

Summary

The Azure ML and Azure ML - Remote extensions starting version 0.44.0 have undergone an authentication update to improve security and flexibility. The old flow, which eventually depended on the Azure Account extension to obtain authentication tokens has been replaced with native VSCode authentication providers.

Benefits

The native VSCode authentication has multiple benefits:

  • It eliminates our dependency on Azure Account extension, therefore eliminating the dependency of remote connections on Azure ML extension, enabling us to support MSAL authentication provider in both the extensions.
  • It allows the user to reuse the VSCode sign in sessions for all the extensions i.e. if you are already signed in to your account (e.g. for settings sync), you can use the same for your extensions.

Troubleshooting

If you are on an old version of VSCode or the extension:

  • Make sure you have the latest version of VSCode installed.
  • Make sure you have the Azure ML and Azure ML - Remote extension's version updated to a minimum of 0.44.0.

If your subscription is associated with a tenant/directory other the default tenant/directory

  • Open VS Code and ensure you are signed into your account. You may sign in using the Azure ML: Sign In command (accessible via the command palette).
  • Run Azure ML: Sign In to Directory.
  • Select a tenant from the list of displayed tenants.
  • Complete the additional sign in steps.

If you are using non-public clouds (e.g. AzureUSGovernment, AzureChina etc...):

  • Open VSCode settings
  • Navigate to Workspace -> Extensions -> Microsoft Sovereign Cloud.
  • Alternatively, you can search for setting microsoft-sovereign-cloud.environment in the settings search bar.
  • Select your cloud under the setting Microsoft-sovereign-cloud: Environment under User settings.

Known Issues

  • If you are already signed in with an Azure Account, signing in with a new Azure account without signing out from the existing one makes the subscriptions inaccessible from the extensions. See here
  • When changing the microsoft-sovereign-cloud.environment setting, the tree view is not refreshed automatically and you have to refresh it manually. Additionally, the Sign In button in the tree view or the Sign In command in the command palette won't work immediately until, you have reloaded the window
  • Azure ML extension is unable to pick other Azure extensions' sign in and you have to sign in separately for this extension