How to authenticate to Azure App Service using DefaultAzureCredential

Matthew Jensen 20 Reputation points
2024-08-30T17:11:50.3533333+00:00

I've created an application in Azure App Service, currently it's accessible via the browser using Entra ID Easy Authentication.

I'd like to access the application via my Default Azure Credential in Python but I run into the error: DefaultAzureCredential failed to retrieve a token. I have no issue getting a management.azure.com token.

I don't want to be create more app registrations I just want to use my own Entra ID account to access the web app, how is this possible?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,643 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,304 questions
0 comments No comments
{count} votes

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.