Freigeben über


Web App Instance Name and ARR affinity Mapping using Function App – Part-4

This Post is in continuation of Post :Web App Instance Name and ARR affinity Mapping using Function App – Part-3

as Part 4  Our next step is Creating a blank Function app and add application settings section :

7. Note down Subscription id and Tenant Id from Azure Portal.

          When programmatically logging in, you need to pass the tenant ID with your authentication request.

  • Select Azure Active Directory.

    select azure active directory

  • To get the tenant ID, select Properties for your Azure AD tenant.

    select Azure AD properties

  • Copy the Directory ID. This value is your tenant ID.

    tenant ID

  • On Azure portal , click on subscription option in left and Note the subscription Id details under which we have assigned the Service principal in last post and we shall be able to get the Web App instance details which are created in this subscription only.

           image

8. Create a new Function App.

              refer this link to create a function app in Azure : https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-function-app-portal#create-a-function-app 

one the function app is created , go to Function apps option on left hand side of Azure portal to open that function app and then select the Application setting to create the various application setting :

image

9. Create Application settings for : Subscription id ,  Tenant Id  , Application Id & Client Secret .

image

Here like we discussed :

AADApplicationId is same as Service Principal Id also known as Client ID , which is nothing but AAD application’s Application Id.

AADApplicationKey is same as Client Secret which is the Key which you have created in previous post for AAD application.

Please note , the Github code in Function app is written to read these app setting keys , if you write different  app setting key names ,then you will need to modify that code as well to read those keys , otherwise you will end up getting no key and thus runtime exception.

Now in Next Post we will go through  Deploy the Function App code & Test It section here :
Web App Instance Name and ARR affinity Mapping using Function App – Part-5