Webapp website and webapp API authentication

Walter Rodriguez 20 Reputation points
2024-07-02T01:51:55.68+00:00

having trouble setting up built in auth for communication between a website and web api. Both are deployed using webapp azure app service. website was configured using external configuration for public users. However I don't know how to enable authorized access so that the website can make successful authenticated backend api calls.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,334 questions
0 comments No comments
{count} votes

Accepted answer
  1. Deepanshukatara-6769 7,525 Reputation points
    2024-07-02T05:19:06.1833333+00:00

    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:

    1. Create an app registration in your workforce or external tenant.
    2. Enable authentication and authorization for both the website and the web API.
    3. Grant the frontend app access to the backend app on the user's behalf.
    4. Configure App Service to return a usable token.
    5. Use the token in your code.

    You can find detailed instructions on how to perform these steps in the following Microsoft documentation:

    Kindly accept answer if it helps

    Please let us know if any further questions

    Thanks

    Deepanshu


0 additional answers

Sort by: Most helpful