Skip to content

Setup Azure Devops

Lucki2g edited this page Dec 15, 2025 · 2 revisions

Setup using Azure DevOps Pipelines

The most common setup for Data Model Viewer (DMV) is using Azure DevOps which has many benefits:

  1. Automatic daily upgrades of DMV
  2. Support secure methods for storing secrets
  3. Enables the ADO integration

How to

Prerequisit: To setup we assume you have the required permissions in the ADO project to create repositories, variable-groups, service connections and pipelines for the ADO project, as well as access to the Azure resource group and app service.

To get started download the 3 .yaml files only from the DataModelViewer/Setup folder on git. https://github.com/delegateas/DataModelViewer/tree/main/Setup

1. Setup Repository

Goto your ADO-Organization > ADO-Project > Repos > click + New repository in the repository dropdown; and create a new repository where you add the 3 .yaml files.

2. Setup Service Connection

We need a service connection to an azure to allow the pipeline to create our resource group and app service.

Goto your ADO-Organization > ADO-Project > Project Settings > Service Connections (under pipelines) > click New service connection top right.

  • Choose Azure Resource Manager
  • Choose App registration (automatic)
  • Pick correct subscription, and resource group and pick/note-down a suitable name e.g. [initials]-dev-azure.
  • Either grant access permission to all pipelines or come back after step 4 and grant only the DMV pipeline access.

3. Setup Variable Group

Goto your ADO-Organization > ADO-Project > Pipelines > Library > click + Variable group in the header; and name your new group DataModel.

Caution

You can give your group another name. However this will also require you to alter the pipeline files.

Available variables

Below table shows the available variables with a short description.

Name Requirement Description
AzureClientId Required Client id for an Azure App Registration with access to the Dataverse Environment.
AzureClientSecret Required Client Secret for the above. Remember to set its variable type to "Secret"!
AzureTenantId Required Azure Tenant ID (where your App Registration is placed and resource group will be placed).
AzureServiceConnectionName Required Name of the Azure Resource Manager service connection created from ADO to Azure.
AzureLocation Required Name of the location for the resource group in Azure (e.g. "westeurope" - not the display name which is "West Europe").
AzureResourceGroupName Required Name of the Resource Group in Azure. If this matches an existing group in the location above that will be used for the DMV resources, if not a new resource group will be created.
DataverseUrl Required URL for the Dataverse environment which the data model will be based on (e.g. "https://mySystem-dev.crm4.dynamics.com/").
DataverseSolutionNames Required Comma-seperated list of solutionnames from above dataverse environment. Use the logical names (not display names).
WebsiteName Required Used for the url of the web app presenting the data model to the user. The full URL will be in the format "https://wa-{WebsiteName}.azurewebsites.net/" and must be globally unique.
WebsitePassword Required Password used by DMV users to login to the generated site. Remember to set its variable type to "Secret"! And use a strong password generator
WebsiteSessionSecret Required Key to encrypt the session token. Remember to set its variable type to "Secret"! And use a strong password generator We recommend 32 characters
TableGroups Optional Enter a semi-colon separated list of group names and for each group a comma-separated list of table schema names within that group. Then this configuration will be used to order the tables in groups in the DMV side-menu. Example: Org. tables: team, systemuser, businessunit; Sales: opportunity, lead. Read more about this feature under features: table groups.
AdoWikiName Optional Name of your wiki found under "Overview -> Wiki" in ADO. (will be encoded so dont worry about spaces). Read more about this feature under features: ado wiki integration.
AdoWikiPagePath Optional Path to the introduction page you wish to show in DMV. (will also be encoded so dont worry about spaces). Also part of features: ado wiki integration.
WebResourceNameFunc Optional Deprecated! Was once used to define function to fetch the entity logicalname from a webresource. The function must be a valid C# LINQ expression that works on the name input parameter. Default: np(name.Split('/').LastOrDefault()).Split('.').Reverse().Skip(1).FirstOrDefault(). Feature has completely been removed. Instead use features: webresource tagging script.
AdoRepositoryName Optional Name of the existing repo to store diagrams. A folder will be created called diagrams first time being used. Read more about this feature under features: diagram integration.
EnableEntraIdAuth Optional Boolean true/false(default) to enable Entra ID authentication, controlable by the organization.Read more about this feature under features: entra id authentication.
EntraIdAllowedGroups Optional Comma-seperated list of object-ids for the Azure Groups allowed to login using OpenIDs OAuth2 authentication flow. Read more about this feature under features: entra id authentication.
DisablePasswordAuth Optional Boolean true/false(default) to disable password login. We don't recommend disabling passowrd authentication without setting EnableEntraIdAuth=true, as the site would be unreacable for the users.

4. Setup Pipeline

Goto your ADO-Organization > ADO-Project > Pipelines > click New pipeline.

  • Choose Azure Repons Git.
  • Choose the repository from step 1
  • Choose Existing Azure Pipelines YAML file
  • Pick the azure-pipelines-external.yml

Note

If you did not grant all pipelines permission in step 2, then either go back to the service connection > security (under the burger menu) > Pipeline Permissions > add the pipeline. Or you can wait for the initial run which will trigger a "This pipeline needs permission to access a resource..." where permissions can be given.

5. Setup App Service in Azure

Finally you must run the Pipeline. Afterwards go to your azure resource group at https://portal.azure.com and find the app service. On the App Service goto Settings > Configuration and set the Startup Command to node server.js.

Go back to the app service overview and ensure it is running by going to the URL. Otherwise restart the service.

alt text

Pitfalls (Q&A)

  • Did you remember step 5?
  • The used Azure subscription must have "Microsoft.Web" registered as a "Resource provider" (namespace) otherwise the deploy will fail.

Clone this wiki locally