I have a REST API implemented as an Azure function with Azure Active Directory authentication enabled. I would like to restrict the access to a subset of of the exposed methods to a particular set of service principals.
So far the solution I have come up with is to retrieve access_token used by the request and check the application Id against a list manually. This will be done in the body of the the method.
I am looking for a solution that could handle this in the Azure authorization layer before even calling the function. Is it possible?