question

PradeepTripath-7125 avatar image
0 Votes"
PradeepTripath-7125 asked SaurabhSharma-msft commented

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

I have followed the below link to create a Web API and Daemon app registration
https://docs.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.

azure-active-directoryazure-ad-authentication
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @PradeepTripath-7125,

Thanks for using Microsoft Q&A !!

How are you providing the API permissions to your daemon app. Did you follow the steps to create API permissions as mentioned over here. Also, if you are passing the webapi scope correctly like `api://{ClientID}/.default" ? Also, can you check if you have added scope your web API correctly.

Thanks
Saurabh

0 Votes 0 ·

Hi @PradeepTripath-7125,
We haven't heard back from you. Just wanted to check if you are you still facing the issue? In case If you already found a solution, would you please share it here with the community? Otherwise, let us know and we will continue to engage with you on the issue.

Thanks
Saurabh

0 Votes 0 ·

0 Answers