question

PratimDasParthaC-8631 avatar image
0 Votes"
PratimDasParthaC-8631 asked MughundhanRaveendran-MSFT answered

EasyAuth implementation for Azure function app

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-functionsazure-ad-authentication
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MughundhanRaveendran-MSFT avatar image
0 Votes"
MughundhanRaveendran-MSFT answered

@PratimDasParthaC-8631 ,

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.