I want to purge an Azure CDN endpoint from Microsoft Flow. The CDN Profile's Pricing Ties is Standard Verzion
.
I have created a Microsoft Flow with an HTTP - HTTP
action.
I used an URL generated by the tool shown by clicking on Try it
on https://docs.microsoft.com/en-us/rest/api/cdn/endpoints/purgecontent and filling the necessary fields.
I want to purge all CDN content so I put the following as a body (I hope this is the right way as the official docs were silent about this use case).
{
"contentPaths": [
"/*"
]
}
I have created a Registered application
in the Azure Active Directory
and used that to fill in Active Directory OAuth
fields of the HTTP - HTTP
action. I presume that the OAuth authentication is succeeding as if I put wrong values in any of the fields I get a respective error message.
So the HTTP - HTTP
action is filled as on the following image. The image mostly shows where I got the values I used on the real flow.
When I run the flow it fails and shows just Unauthorized.
inside the failed HTTP - HTTP
action.
I have tried to add the app as a Contributor
role of the CDN Profile
but the error stayed the same.
How to get it working?