How to purge frontdoor CDN cache content through Azure managementAPI
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.