How to create a custom authentication instead of Azure AD method to Authenticate my web app service published on Azure.

Shailja Atkotiya 0 Reputation points
2023-08-02T06:25:14.0433333+00:00

I have published my .NET Core Web API project in Azure APP Service. I initially used Azure AD to authenticate the APP Service. I want to authenticate my application using the users added in the Azure PostgreSQL Database. I can create an Azure Function APP which can have the authentication method. But how can I add the same Azure Function APP in the Authentication Layer of the APP Service. The Options that we have in the Azure App Service and APIM are Azure AD & Azure AD B2C.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,640 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ben Gimblett 4,555 Reputation points Microsoft Employee
    2023-08-02T13:08:37.6366667+00:00

    Hey @Shailja Atkotiya - for the scenario in dotnet web app where you want to manage and store your own identity (without deferring to SaaS identity provider) you can use the Identity framework , see here: https://learn.microsoft.com/en-us/aspnet/core/security/authentication/identity?view=aspnetcore-7.0&tabs=visual-studio
    This allows for local storage (what you are asking for) or deferring to an external login provider.

    Note:
    It is generally better practice to consider using an external provider - when you manage your own you are responsible for storing and securing credentials. An external provider takes care of all of that for you.

    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.