EasyAuth implementation for Azure function app

Pratim Das, Partha C 306 Reputation points
2022-02-18T07:58:25.017+00:00

Hi,

As per our current implementation of an enterprise application, we are using Function Key/ API Key to authenticate. Now we need to implement EasyAuth/ Azure AD authentication. Question is do I need to make any explicit code change(i.e. in startup.cs or anywhere) in function app to make it happen? I already made this change "[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req, ILogger log)". I googled several blogs and confused what to do.

Early reply is highly appreciated

Regards,
Partha

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,371 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,826 questions
0 comments No comments
{count} votes

Accepted answer
  1. MughundhanRaveendran-MSFT 12,441 Reputation points
    2022-02-18T11:59:40.587+00:00

    @Pratim Das, Partha C ,

    Thanks for reaching out to Q&A.

    For enabling easy auth in the Azure function, there are no code changes required on the existing Functions code. The change that you have made can be kept as is. However, if you are calling this http trigger function from another app, then you need to make changes to code of the caller app.

    Please refer to the following article that shows how to call a easyauth enabled function api
    https://stackoverflow.com/questions/56570231/how-to-call-an-azure-function-app-api-with-easy-auth-enables-using-active-direct

    I hope this helps!

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    0 comments No comments

0 additional answers

Sort by: Most helpful