Using Azure App Service for authentication and as front-end for Azure API

hampton123 1,175 Reputation points
2023-06-29T18:05:29.6266667+00:00

I want to use an Azure App Service as a frontend for my Azure APIM instance, not only to secure my API but to also act as a user-friendly login system for my API. How would I go about doing this? Are there any templates that exist that I could start with?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,465 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
9,005 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,185 questions
Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

Accepted answer
  1. Sina Salam 22,191 Reputation points Volunteer Moderator
    2023-06-30T16:12:32.3066667+00:00

    @Hunter B

    Welcome to Microsoft Q&A and thank you for posting your questions here.

    To understand your question, you would like to use Azure App Service for authentication and as front-end for Azure API, also; you would like to know how to go about doing this and if there any templates that exist that you can use for a start.

    Yes, you can use Azure App Service as a frontend for your Azure APIM instance.

    To use for front-end for Azure API, Authentication, how to go about it and different work around and scenarios could be found in the link below.

    Create a Front Door for a highly available global web application.

    The link will guide you to use step by steps for standard/premium or classic with images.

    Hope you find this helpful! To let the community and other users know this answer is useful, kindly vote for it. Do not hesitate to contact if you have more questions.

    Best Regards,

    Sina


1 additional answer

Sort by: Most helpful
  1. Pramod Valavala 20,656 Reputation points Microsoft Employee Moderator
    2023-06-30T18:20:49.8533333+00:00

    @hampton123 I'm unsure if there is any readily available template for this but the best way to do this would be to create a function app with authentication enabled, and a single function that forwards all requests including authentication information to APIM.APIM policies could be used to validate the token and/or perform authorizations based on the scopes present as required.

    Since the Function App is serverless and is simple, it should scale well with your application. For cross region deployments and/or for redundancy, you would just deploy multiple instances of this function app with the same authentication settings.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.