I published a Web ASP.NET Core App with Azure AD authentication successully on our Azure subscription.
The business logic of this web app is developed as api route, with json objects as input and output parameters.
I would like to expose this api to external applications (i.e. console application running outside the Azure subscription, calling a get/post httpclient) but I'm not able to set the correct authentication. Any calls to the web app api url return the html Azure sign-in page.
If I set a correct cookie (".AspNetCore.AzureADCookie") on the httpclient call, it works well, but the cookie expires after 1 hour.
How can I generate this cookie?
Otherwise, how can I authenticate the console application to Azure AD to successfully call web app api?
Thanks a lot,