How to purge frontdoor CDN cache content through Azure managementAPI

Narale,Tushar 0 Reputation points
2025-01-20T06:38:13.62+00:00

We want to purge azure frontdoor CDN cache from our app service whose whole purporse is to deploy static content to storage account and purge CDN cache that is associated with that storage account.

Previously, this was working fine when CDN we used was Edgio. The app service was given CDN endpoint contributor permissions to Edgio CDN endpoint resource.

After switching to frontdoor CDN, we used below URL to purge frontdoor CDN. However we keep getting 403 error.

https://management.azure.com/subscriptions/${cdnInfo.subscription}/resourceGroups/${cdnInfo.resourceGroup}/providers/Microsoft.Cdn/profiles/${cdnInfo.profile}/afdEndpoints/${cdnInfo.endpoint}/purge?api-version=2023-05-01

We tried giving same permission (CDN endpoint contributor permission) on frontdoor CDN, but that still gives 403 error. Any idea what are we doing wrong here or if Azure frontdoor CDN expects different permissions given to app service in question.

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
730 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,210 questions
{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.