Unable to login to Azure account with Azure DevOps CLI

Kevin GUIMARD 40 Reputation points
2023-05-12T09:17:23.0466667+00:00

Hello,

I'm running through this tutorial:
https://github.com/Azure-Samples/azure-search-openai-demo/tree/main
and I encounter an issue when running the command "azd auth login" in GitHub Codespaces' terminal. This very command opens an URL of the kind "http://localhost:43927/?code=0.AQMAoZ4s1SF8sUe..." on my personal laptop, which triggers an error since nothing is running locally on that port. I guess it tries to connect to the server deployed on the Cloud.

Regards,
Kevin

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,103 questions
0 comments No comments
{count} votes

Accepted answer
  1. AirGordon 7,125 Reputation points
    2023-05-12T11:16:27.06+00:00

    I use codespaces quite a lot, and tend to find that logging into Azure needs the --use-device-code flag set.

    Eg. az login --use-device-code or azd auth login --use-device-code

    Hope this helps you.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.