Hi Walter, Welcome to MS Q&A
To enable authorized access for communication between a website and web API using Azure App Service, you need to enable authentication and authorization for both the website and the web API. This involves creating an app registration in your workforce or external tenant, granting the frontend app access to the backend app, configuring App Service to return a usable token, and using the token in your code. You can follow the steps outlined in the Azure App Service documentation to enable authentication and authorization for your website and web API.
Here are the general steps to enable authorized access for communication between a website and web API using Azure App Service:
- Create an app registration in your workforce or external tenant.
- Enable authentication and authorization for both the website and the web API.
- Grant the frontend app access to the backend app on the user's behalf.
- Configure App Service to return a usable token.
- Use the token in your code.
You can find detailed instructions on how to perform these steps in the following Microsoft documentation:
- Quickstart: Add app authentication to your web app running on Azure App Service
- Tutorial: Authenticate and authorize users end-to-end in Azure App Service (platform-windows)
- Authentication and authorization in Azure App Service and Azure Functions
- Tutorial: Authenticate and authorize users end-to-end in Azure App Service (platform-linux)
- Enable authentication in your own web API by using Azure AD B2C
Kindly accept answer if it helps
Please let us know if any further questions
Thanks
Deepanshu