Skip to main content Skip to footer

Search Crosser Knowledge Base

Microsoft Dynamics 365 Modules

Modules Covered

  • Microsoft Dynamics Create Record
  • Microsoft Dynamics Get Record

How to register an App for Dynamics/Dataverse

Introduction

This guide will guide you through the process of registering an App for Dynamics/Dataverse and get the credentials you will need to complete the Oauth setup to get the token.

Register your application

Note: To be able to complete the registration you must be an Azure Active Directory Admin

The first part is to register your app in Azure Portal under Azure Active Directory following the below steps.

First login to Azure Portal and then navigate to Azure Active Directory

Now click on the App registrations and then click on New registration

Next step is to give your App a name, set access and Redirect.

When the App has been created you can find the Application (Client) Id from the overview page. Copy the Client Id, you will need it later when setting up your OAuth credentials

Now go to the Manifest tab and in the manifest editor, set the allowPublicClient property to true and click on Save.

Next step is to add permissions to the newly created App.

This is done from API permissions and then click on Add a permission 

Select APIs my organization uses tab and then choose or search for Dataverse

Click on Delegated permissions and check the options and click on Add permissions.

Create Client Secret

Now when the App is created the next step is to generate a Client Secret. Follow below steps to create your Client secret and finalize your OAuth credentials

Click on Certificates & secrets and then New client secret

Enter a description for the Client secret and select expiration date, click Add to add your Client secret

When you have created your client secret make sure you copy it so you can use it later when adding your credentials in Crosser.

Next step is to set up a Dataverse Application User that is connected to the app you created above. This app user is a fictional user account that will be performing the API operations on your real account's behalf without the need for interaction from a real user.

See this link to see how it is done: https://docs.microsoft.com/en-us/power-platform/admin/manage-application-users#create-an-application-user

Note: Make sure you assign the correct security roles to the application user, otherwise you will run into errors along the lines of "Principal user [...] is missing prvCreateAccount privilege [...] for entity ..." when using this module.

Authentication

You need an OAuth Client Credential that corresponds to the above mentioned app.

In the New Credential dialog box, fill in this info:

  1. Type: OAuth Client Credential grant
  2. Authentication URL: https://login.microsoftonline.com/<Your Tenant ID>/oauth2/v2.0/token
    Where Tenant ID looks something like dad3d13-d1d1-d1d1...
    It is found by navigating to portal.azure.com. Your Tenant ID is listed under "Basic Information."
  3. Client ID: <client id> (sometimes called "App ID") - Use the client ID value you copied in the steps above when creating the App
  4. Client secret: <client secret> - Use the client secret value you copied in the steps above when creating the App
  5. Scope: <Environment URL>/.default
    Where <Environment URL> looks like https://xxxxxxxxxxx.crm4.dynamics.com
    It is found by navigating to admin.powerplatform.microsoft.com and clicking the environment that you wish to interact with using this module (e.g. "Sales").
    The Environment URL is displayed in the "Details" box. Enter it as is, without changing it.
  6. Token renewal URL: <leave blank>

About the author

Goran Appelquist

Göran has 20 years experience in leading technology teams. He’s the lead architect of our end-to-end solution and is extremely focused in securing the lowest possible Total Cost of Ownership for our customers.

"Hidden Lifecycle (employee) cost can account for 5-10 times the purchase price of software. Our goal is to offer a solution that automates and removes most of the tasks that is costly over the lifecycle.

My career started in the academic world where I got a PhD in physics by researching large scale data acquisition systems for physics experiments, such as the LHC at CERN. After leaving academia I have been working in several tech startups in different management positions over the last 20 years.

In most of these positions I have stood with one foot in the R&D team and another in the product/business teams. My passion is learning new technologies, use it to develop innovative products and explain the solutions to end users, technical or non-technical."