adding AAD to azure function app

Naruto 61 Reputation points
2021-01-19T14:29:47.207+00:00

I have created a python functionapp and published it from VS code.

my question is

  • Now I need to add AAD to my function app, instead of adding it from portal I need to add the secret via code how do I add them?
  • also if my function is passed through an api how to add oauth token to it?
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,299 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,568 questions
0 comments No comments
{count} votes

Accepted answer
  1. JamesTran-MSFT 36,376 Reputation points Microsoft Employee
    2021-01-19T18:01:07.253+00:00

    @Naruto
    Thank you for your post!

    Here's some documentation that you can use to get an idea of how to implement AzureAD authentication into your Python Function App via code. You can also reference our Other authentication methods doc for authenticating with token credentials.

    Additional resource:
    Authenticating your Python application against Azure Active Directory

    If you have any other questions, please let me know.
    Thank you for your time and patience throughout this issue.

    ----------

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. sadomovalex 3,626 Reputation points
    2021-01-19T14:48:04.417+00:00

    you need to register new AAD app and then secure your Function app with this AAD app. Check the following article: Call Azure AD secured Azure functions from C#. It contains example on C# but idea will be the same.

    0 comments No comments