[BUG]Azure MCP could not auth even though az login succeeds
Describe the bug
Azure MCP tools fail to query kusto database which I have access to.
Expected behavior
The MCP tool should be able to query kusto database.
Actual behavior
The mcp tool fails saying it fails to auth, even though I have run the az login and successfully completed and am able to run other az command like 'az account' in the terminal.
Reproduction Steps
Steps:
- in VS Code, install Azure MCP server
- open copilot chat, enabled the azure mcp server tools
- ask it to make some kusto queries
Environment
Note I am able to make query using kusto data explorer.
Thanks for reaching out and reporting this issue, @bryanchen-d! @xiangyan99 can you please take a look?
ChainedTokenCredential attempts a list of credentials.
If you want to use cli for the authentication, can you try set env var AZURE_TOKEN_CREDENTIALS="azureclicredential"?
If you want to use cli for the authentication, can you try set env var AZURE_TOKEN_CREDENTIALS="azureclicredential"?
this wouldn't be the end result of this issue though, right? Bryan wanted to use the Azure MCP Server kusto tools and couldn't... az CLI was the quickest thing to grab to manipulate to try to get this working.
He was trying that as a way to unblock himself, not because that was the issue. We still need to understand why it didn't work in the first place.
If you want to use cli for the authentication, can you try set env var AZURE_TOKEN_CREDENTIALS="azureclicredential"?
this wouldn't be the end result of this issue though, right? Bryan wanted to use the Azure MCP Server kusto tools and couldn't...
azCLI was the quickest thing to grab to manipulate to try to get this working.He was trying that as a way to unblock himself, not because that was the issue. We still need to understand why it didn't work in the first place.
Yes. This step will help us narrow down the issue and determine whether the authentication failed within the CLI or before reaching the CLI credentials.
@xiangyan99 , I tried setting that env var but it still fails with the same error.