Microsoft Dynamics 365

Microsoft Dynamics 365

Modules

- 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  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.

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>

    • Related Articles

    • Microsoft Teams

      Modules Microsoft Teams List Chats Microsoft Teams Send Chat These modules can be used to send chat messages to Microsoft Teams. When sending chat messages you need to reference the destination chat by providing its ID. If you are using Microsoft ...
    • Introducing Crosser Control Center and a new Flow Studio

      Release Note Crosser Control Center Feb 2, 2023 Introducing Crosser Control Center With this release we are introducing some brand changes that gradually will be implemented across all documentation, illustrations and marketing materials. The main ...
    • Crosser Module Library

      Crosser Module Library This document presents the currently available standard modules for use with the Crosser Edge Node. The module library is constantly expanded with new modules. New modules are typically developed in a time frame of days to ...
    • Integration to Azure Event Grid

      Introduction Microsoft announced integration to Azure Event Grid via native MQTT v3.1.1 and v5 as a preview. With this option, you will be able to communicate with your Azure Event Grid directly without the need to go through the Azure IoT Hub. In ...
    • How to use RegEx

      How to use Regular Expressions (RegEx) In Crosser you can filter or split messages based on rules and conditions with different operators. For advanced use cases, it might be required to use more complex rules to fulfill the requirement. For such ...