Skip to content

Azure Agent Unable to Find Access Token For Azure PowerShell #393

@bmkaiser

Description

@bmkaiser

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Steps to reproduce

When using the Azure agent, it is unable to find my access token when using Connect-AzAccount. However, when I use az login with the Azure CLI, it works. I tested with both version 4.0.2 and 5.1.0 of the Az.Accounts module.

Expected behavior

I should be able to use either Connect-AzAccount or az login for creating and caching an access token.

Actual behavior

I am only able to successfully connect to the Azure agent after running az login.

Error details

ERROR: Failed to start a chat session: Access token not available.
ERROR: The 'azure' agent depends on the Azure CLI credential or Azure PowerShell credential to acquire access token. Please run 'az login' or 'Connect-AzAccount' from a command-line shell to setup account. Once you've successfully logged in, run '/refresh' to start a new conversation.

Environment data

Name                           Value
----                           -----
PSVersion                      7.5.2
PSEdition                      Core
GitCommitId                    7.5.2
OS                             Microsoft Windows 10.0.26100
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

1.0.0-preview.5

Visuals

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions