Describe the bug
From the README it seems like the attached code should successfully authenticate to AzureSQL via Managed Identity. However, the request fails with the attached error.
Exception message:
GET http://169.254.169.254/metadata/identity/oauth2/token
--------------------------------------------------------------------------------
RESPONSE 400 Bad Request
--------------------------------------------------------------------------------
{
"error": "invalid_request",
"error_description": "Identity not found"
}
--------------------------------------------------------------------------------
To troubleshoot, visit https://aka.ms/azsdk/go/identity/troubleshoot#managed-id
Stack trace: N/A
Describe the bug From the README it seems like the attached code should successfully authenticate to AzureSQL via Managed Identity. However, the request fails with the attached error.
To Reproduce
Expected behavior Ideally - and as the README suggests 😅 - the "simple" solution should work without having to provide a token provider manually.
Further technical details
SQL Server version: Azure SQL (General Purpose - Serverless: Standard-series (Gen5), 2 vCores) Operating system: Docker container running on AKS Table schema
Additional context Versions: