Connecting to Common Data Services
Connecting to Microsoft Common Data Services can either be done with an application user or with a real person user. We recommend connecting as an application user because you don’t need an own dynamics-license for this connection.
Configuring an Application User in Azure AD and Dynamics
First you need to register BiG EVAL as an application in your Azure Active Directory.
- Open your Azure Active Directory Management Portal.
- Under “App Registrations” add a new App.
- Enter a unique name and choose the appropriate options under “supported account types”.
- The redirect URL is not needed, but you must enter a value. Use “Web” and enter “https://myapp.com/auth” for example. It doesn’t matter what you enter.
- When the app is registered, open “Manifest” in the navigation menu.
- Set the value of the attribute “allowPublicClient” to true and save the manifest. -> “allowPublicClient”: true,
- Open “API permissions” in the navigation menu.
- Add permissions to your CDS-instance by searching for “Common Data Services” under the register “APIs my Organization uses”. If you own multiple organizations, you need to try out, which one is the right.
- Open “Certificates & secrets” in the navigation menu.
- Add a client secret and keep the generated value in a safe place.
- Switch to the “Overview” in the navigation menu and make note of the following values for later reference (keep them in a safe place).
- Application (client) ID
- Directory (tenant) ID
- Client Secret -> from the previous step.
- Login to Microsoft Dynamics using an admin-user and switch to the “Advanced Settings”.
- Open “Settings” “Security” “Users”.
- Switch to the “Application Users” view.
- Add a new application-user.
- In the new-user-dialog you may switch the form to “USER: APPLICATION USER” right besides the user-logo.
- As the user-name you can enter the same name as you choose in your Azure AD app registration.
- Enter the application ID noted before into the “Application ID” field.
- Enter a full name and any email-address you want. This could also be a fake-email address, because it will not be used later on.
- Save the user.
- Assign the appropriate roles to the user.
Creating a Datasource in BiG EVAL
If the preparation steps in Azure AD and Dynamics are done, you can proceed with the following steps. Please note, that you need the values mentioned above to succeed with the following steps.
- Open BiG EVAL and open the navigation menu “System” > “Datasources”.
- Add a new datasource and give it a name.
- Choose “Microsoft Common Data Services” as the type of the datasource.
- Switch to the “Common Data Services” register and enter the following values:
- Service URL
This is the URL of your common data services. You find them in the PowerApps Admincenter (https://admin.powerplatform.microsoft.com/environments). Open the environment you want to connect to, and you find the “Environment URL”. Add “https://” in front of that URL and enter it into BiG EVAL.
- Authentication Type
Choose either to authenticate as an application (recommended) or as a specific user. The latter needs an own license in Dynamics for example. So connecting as an application is recommended. Depending on your selection, you need different things for authentication in this dialog.
- Tenant ID -> from above
- Application ID -> from above
- Client Secret -> from above
- API Version -> usually leave v9.1 except you need another API version.
- Username (only with user-authentication)
- Password (only with user-authentication)
- Service URL
- Save the Datasource.