I want to set up a site using both a CDN, an App Service, and Azure active directory authentication. I was able to set up an CDN endpoint and point it to my .Net Core App Service, that was straightforward (doc: https://docs.microsoft.com/en-us/azure/cdn/cdn-add-to-web-app). After adding authentication I am unable to use the site properly. When I hit the cdn endpoint I am redirected to the origin and get an 'error' page. I can't seem to find any guidance for how to implement rules that would allow me to use Azure AD Auth through via the CDN. Ideally the user would log into the app service via the CDN. I have seen some docs on token auth, but am unsure how I could use that in conjunction with Azure AD auth. I need caching and POP due to the large amount of static content my site has.
Reference:
(End User) -> (cdn endpoint) -> app service with auth checks.
I am not 100% sure using a CDN is the right approach because of my Active Directory requirement- would Azure Front door make more sense? It seems to be more of an ADN with caching functionality. Thanks!