Accessing Web API via AD from Daemon app- "You do not have permission to view this directory or page."

Pradeep Tripath 1 Reputation point
2021-05-22T18:43:10.55+00:00

I have followed the below link to create a Web API and Daemon app registration
https://learn.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad

When I call Web API using the code at following link:
https://github.com/Azure-Samples/active-directory-dotnetcore-daemon-v2/archive/master.zip

I am getting following response from Web API
"You do not have permission to view this directory or page."

I have added my APPID URL as ApiUrl and client credentials of Daemon app in appsettings.

Hope I have missed something. Appreciate a quick response as I have spent a lot of time in troubleshooting the issue.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,570 questions
{count} votes