Way to get App Service EasyAuth (i.e. AuthZ/AuthN) to work locally

Alex Gagnon 87 Reputation points
2024-01-30T16:42:25.85+00:00

Hi, I'd like to look into using EasyAuth for an app, but is there a way to run this functionality locally while developing? It seems like this would only be offered once deployed to Azure, which limits the DX quite a bit in terms of development speed.

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

3 answers

Sort by: Most helpful
  1. Saravanan Ganesan 1,830 Reputation points MVP
    2024-01-30T17:00:02.3333333+00:00

    Hi Alex , Yes, you can emulate EasyAuth locally for development. Install Azure Functions Core Tools and run your app locally using func start. Configure your local.settings.json with "AzureWebJobsSecretStorageType": "files". This allows authentication to be stored locally. For full functionality, mock user identities with a tool like IdentityServer. Ensure your app is configured to use the same authentication settings locally and in Azure. Although not an exact replica, this approach allows you to develop and test EasyAuth features locally, enhancing development speed before deploying to Azure for final testing. Regards, Saravanan Ganesan.


  2. Grmacjon-MSFT 17,886 Reputation points
    2024-02-21T00:03:43.77+00:00

    Hello @Alex Gagnon yes this can be done without using azure functions. Here’s a method that uses Docker to run EasyAuth locally that you can try which was found in this blog post This approach allows you to develop and test EasyAuth features locally, enhancing development speed before deploying to Azure for final testing Please remember this is just a suggestion, make sure to review any potential security and privacy implications before choosing this solution.

    Best, Grace


  3. Grmacjon-MSFT 17,886 Reputation points
    2024-03-01T06:31:14.0933333+00:00

    @Alex Gagnon I heard back from the engineering team, and they confirmed using EasyAuth in app service locally is not fully supported. so there isn't an official way to achieve this.

    0 comments No comments

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.