How to Deploy the Easy Taxonomy Web Service [V3.7]

Modified on Tue, 30 Apr at 7:13 PM

Easy Taxonomy Web Service™ allows you to integrate the Easy Taxonomy™ solution with external systems; Once deployed, the web service allows external systems, by calling the web service URL, to obtain a Json formatted file that contains the latest published versions of the taxonomy trees.


The Following Steps explain in details how to deploy and use the Web Service:



To learn more about how to call the Web Service once it is deployed, please refer to the article How to Invoke the Web Service.


TABLE OF CONTENTS



Register Application and Grant Permissions

To ensure secure access is provided for the app, you need to create a Certification and register it using the Microsoft Entra ID.


Create a Certificate

Follow the steps below to create a certificate.


1. Download the Zip file "Create-SelfSignedCertificate.ps1" in the Attachments section below.


2. Open Windows PowerShell or Visual Studio Code with administrator privileges.


3. Navigate to the folder where the above file is stored (eg. cd  D:/SP/AzureAppLogin).


4. Run the command below where StartDate and End Date are dates in “YYYY-MM-dd” format.  and Password is the Private Key

./Create-SelfSignedCertificate.ps1 -StartDate {stDate} -EndDate {edDate} -Password {privateKey}

Notes: 

  • If you skip entering the password in the command, you will be asked to enter it when you hit the enter key.
  • Save the password you entered in the command line as it is going to be needed in a future step.
  • This script will generate 2 files (AzureAppLogintoSP.cer, AzureAppLogintoSP.pfx) that you will be using in the following steps.



Register the Application


1. Navigate to portal.azure.com


2. Click on Microsoft Entra ID



3. In the Add menu click App Registration



4. Fill in the form as illustrated in the screenshot below and click Register



5. On the App Registration details page, select Certificates and Secrets in the left navigation.



6. Click on the Certificates tab, and then click Upload Certificate


7. In the Upload a certificate field select the "AzureAppLogintoSP.cer" file generated in the Create a Certificate section above, provide a description and click Add.



Grant Permissions


1. In the left navigation select API Permissions, then click on Add a permission.



2. On the displayed pane, select the SharePoint tile



3. On the Request API permissions pane, select the Application permissions, then check the checkbox for Site.FullControl.All, and click Add permissions.



4. Select the newly added permissions and click the Grant admin consent for "Resource name"



5. Navigate to the Overview page and copy the Application (Client) ID, to be used in the following deployment steps.




Deploy the Web Service Function in Azure Portal


Download and Edit the Web Service Package

The Web Service package "TaxonomyWebService-AzureFunctionApp-V3.7.zip" contains the code to be deployed to the Azure Function.


1. Download the Web Service API package "TaxonomyWebService-AzureFunctionApp-V3.7.zip" in the Attachments section below.


2. Unzip the package


3. In the folder "Certificate", replace the "AzureAppLogintoSP.pfx" file with the generated file in the Create a Certificate section above.


4. Zip the package.


Create the Function App in Azure


1. Navigate to the Azure Portal


2. Create a Resource Group


3. Create a Function in the resource group


For more details, please refer to the "Create your first function in the Azure portal".


Deploy the Function App in azure


1. Download and install the Azure CLI (Azure Command-Line Interface)


2. Open the PowerShell and run the command-line to login


az login

3. Run the command-line to deploy function app

az functionapp deployment source config-zip -g <<ResourceGroupName>> -n \<<FunctionAppName>> --src <<ZIPFilePath>>
  • ResouceGroupName: Name of the resource group created in the section above.
  • FunctionAppName: Name of the Azure function created in the step above
  • ZIPFilePath: the path to the Web Service Package


Complete the Function App Configuration


1. Sign in to the Azure portal with your Azure account.


2. Open the Function app


3. Navigate to the Environment variables



4. Create the Following Application Settings

  • CertificatePrivateKey: Enter the Password used to generate the certificate in the Create a Certificate section above.
  • ClientId: Enter the Application Client ID retrieved in the Grant permissions section.
  • ConfigListName: The name of the list containing Easy Taxonomy™ configuration, usually "Taxonomy Configuration".
  • Domain: Enter the domain name of your tenant, e.g., contoso.onmicrosoft.com. 
  • SiteUrl: The SharePoint site where Easy Taxonomy™ is installed, e.g., contoso.sharepoint.com/sites/EasyTaxonomy/SitePages/CollabHome.aspx.

Get the Function App URL


1. Sign in to the Azure portal with your Azure account.


2. Navigate to the Function Overview Page



3. Click on the TaxonomyReport Function



4. In the top menu select Get Function URL



5. Copy the displayed URL


6. To test the URL, pass it into the web browser address bar and hit enter, the system will display the Json formatted file containing the latest published version of the taxonomy(ies).


Attachments

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article