Hi @Ravi Nagumalli ,
Thanks for reaching out. Apologies for delay in response .
To register APIM as an OAuth Application in Azure AD, the Client ID and Client Secret are just a one-time setup requirement.
You should be able to generate multiple client secrets for the same application, but client id will remain the same. Also, Azure AD token don’t recognize different client secrets, it contains only client Id which would be same from each partner for same API.
In your scenario to achieve this using Azure AD, you need to register your search APIs in Azure AD which means API is protected by Azure now and to access the protected API each partner needs to fetch a token from Azure AD to access the search API further.
In this case, Different partners might be invoking the protected search API from different platforms (Native, Web, Mobile) would need to be registered in Azure AD separately and then they can use different OAuth approaches to fetch the token and pass the token as ‘Bearer Token’ in Authorization Header to access your search API.
Only those front-end applications registered in Azure AD which has permissions to custom API can access the search API. You should be able to identify which partner (client application) is calling the custom API using app_displayName and appId claims in the token access and based on that filter the specific data in the search API.
In case of more questions related to this, we are happy to help and elaborate further.
Thanks,
Shweta
--------------------------------------------------------------
Please remember to "Accept Answer" or "Up-Vote if answer helped you.