Skip to content

check if logged in before running azd ai agent init #7547

@therealjohn

Description

@therealjohn

I can run init without being logged in and then it ERRORs and now Im in a state where I have to init again.

v0.1.20-preview 
Visit the docs at https://aka.ms/azd-ai-agent-docs

? An existing agent manifest was found at "agent.manifest.yaml". Use it?: Yes
Let's get your project initialized.

Initializing an app to run on Azure (azd init)

WARNING: The current directory is not empty.
Initializing an app in this directory may overwrite existing files.

? Continue initializing an app in 'C:\Users\johmil\Projects\azd-test\echo-agent-streaming'? Yes                                                                                                                           
  WARNING: The following files are present both locally and in the template:
 * README.md
? What would you like to do with these files? Keep my existing files unchanged                                                                                                                                            
                                                                                                                                                                                                                          
Installing required extensions...                                                                                                                                                                                         
  (-) Skipped: Installing azure.ai.agents extension (version 0.1.20-preview already installed)

Reading agent.yaml from local file: agent.manifest.yaml
✓ YAML content successfully validated against AgentManifest format
The manifest does not contain parameters that need to be configured.
Select an Azure subscription to provision your agent and Foundry project resources.

ERROR: failed to prompt for subscription: not logged in, run `azd auth login` to login

Suggestion: run `azd auth login` to authenticat

Metadata

Metadata

Assignees

Labels

ext-agentsazure.ai.agents extension

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions