Skip to main content
Skyhigh Security

Configure and Connect the Microsoft Dynamics API

Prerequisites

The following prerequisites are required:

  • System Administrator access to a Microsoft Dynamics 365. 
  • Global Administrator access to Microsoft Azure.
  • Administrator access to Skyhigh CASB.

Step 1: Create Custom OAuth Application in Microsoft Azure

To create a Custom OAuth Application, refer to Custom OAuth Application for Office 365 and Azure API Integration and check the following notes before you begin.

IMPORTANT:

DO NOT connect the Skyhigh CASB to Dynamics yet, we first need to complete the steps outlined below. Follow the Custom OAuth Application for Office 365 and Azure API Integration up until the Skyhigh CASB API Connection section, and then come back to this guide and complete the steps below.

  • You can't enable API access for Dynamics 365 using the Office 365 Global Admin account. To enable API access for Skyhigh CASB, you need to create a Custom OAuth application within Azure application registrations as described in Custom OAuth Application for Office 365 and Azure API Integration.
  • If you have already enabled Office 365 services such as OneDrive, SharePoint, Exchange, or Azure in Skyhigh CASB using the GA account, then you don't need to disable these connections. They can continue to use the access granted by the Global Admin. 
  • Make a note of the .pem file uploaded under Certificates and Secrets, later you can use the .pem file as the private key in Step 5.  Also, make a note of the auto-populated Thumbprint ID located under Certificates and Secrets. Later, you can use this as Thumb Print in Step 5.

Step 2: Configure Global Audit Settings

To perform the following activities, you must have the system administrator or custom security role or equivalent permissions.

  1. Log in to the Microsoft Dynamics 365 account as admin or other equivalent roles.
  2. Go to Settings > Advanced Settings.
    clipboard_ecfd1796ec05794fb877a6a8c75cf72b2.png
  3. On the Business Management page, select Settings from the menu.
  4. Under System, click Auditing.
    clipboard_e2e56c596015e6b4da52179f5d9e208be.png
  5. On the Auditing page, click Global Audit Settings
    clipboard_ebebbdc91d5217b1be6f2caedf6341184.png
  6. You are redirected to the System Settings dialog. Under the Auditing tab, configure the following:
    clipboard_e8eecc9414914e3b507ce824bceaa6fef.png
    • Under Audit Settings, activate these checkboxes:
      • Start Auditing
      • Audit user access
      • Start Read Auditing. This option appears only when you activate Start Auditing.
    • Under Enable Auditing in the following areas, activate all the entity types that you wish to apply DLP on.
  7. To view the listed types in each entity,  hover over each entity type.

NOTE: Before you click OK, the Audit Entities type shows as disabled. After you click OK,  go back to Global Audit Settings and the entity type shows as enabled as per the following screenshot.
clipboard_e0e6f2e8ac77b09bed7d23e835a699905.png

  1. Click OK.

Enable Audit for Specific Entity

Global Audit Settings are common entities and part of Sales, Marketing, or Customer Service Entities. If you want to choose the other entities, then perform the following activities:

  1. Log in to the Microsoft Dynamics 365 account as admin or other equivalent roles.
  2. Go to System > Auditing and click Entity and Field Audit Settings.
    clipboard_ea3795a1e530e48a9e60382a346c6e720.png
  3. The Power Apps dialog opens. Under Entities, select an entity to enable audit. For example, to enable audit for Note, scroll down in the Entities panel, and click Note.
    NOTE: To enable files in NRT, select the Note entity to enable it for audit.
  4. Under the General tab > Data Services, activate the Auditing checkbox. 
  5. Click Save.
    clipboard_e6b95834d87c1f63027c2f5d781940699.png

Step 3: Create an Application User under Power Platform Admin Center

  1. Log in to Microsoft Office 365 and click the Power Platform admin center.
  2. Go to Environments section. Select and click your Dynamic 365 CRM/Dataverse environment.
    clipboard_ebe34ab9e526658c58caa9ae24c8975c0.png
  3. Click Settings.
  4. Select Users + permissions and click Application Users.
    Picture2.png
  5. On the Application users page, click New app user.
    Picture3.png
  6. On the Create a new app user dialog, configure these:
    •  App. Click +Add an app to list down all the apps that are registered under Azure Active Directory. Search and select your Custom OAuth application which was created in Step 1 and click Add.
      Picture 31.png
    • Business unit. Select the required Business unit from the list and click Create.
      Picture5.png
  7. The newly created app is now added as an Application user for your environment.
    Picture6.png

Step 4: Create Security Role for the Application User

The following two security roles can be assigned to the Application User in Dynamics 365. You can either configure the application user to use a minimum permissions security role or for non-production environments Dynamics system administrator role.

Begin with any one of the following:

Minimum Permission Security Role

This is the recommended approach for production environments. You need to create a new security role and manually assign the permissions to all the corresponding entities you wish to scan using the ODS. If this is a sandbox environment, a shortcut is to use the System Administrator Security Role.

To create the minimum permissions security role and assign it to the application user: 

  1. Go to Settings > Security.
    clipboard_ee1d97db4bf4e00a3e752cf093d228775.png
  2. On the Security page, click Security Roles.
    clipboard_e39f84214b543b05e48404dcc4f68e374.png
  3. On the Security Roles page, click New.
    clipboard_eb0962353117a3a79b238d36315fe8f13.png
  4. By default, the Details tab is displayed. Enter a Role Name. For example, McAfee Application User.
    clipboard_ec12c26614e64820dc36b907bf56f1777.png
  5. For the tabs such as Core RecordsMarketingSalesServiceBusiness Management, Service Management, CustomizationMissing Entities, Business Process FlowsCustom Entities, assign the Organization Key clipboard_ea1c2e198a402ed5a2627b6fcd008730b.png) to all the entities listed in the tab with these privileges: ReadWrite, Delete Assign, and Share.
    clipboard_eeee2f4bbd10fa43d1bee68494dc40aed.png
  6. In the Customization tab, for Service Endpoint, click Create
    service_endpoint_create.png
  7. In the Customization tab, for Sdk Message Processing Step, click create.
    sdk_message.png
  8. Click Save and Close.
  9. Go to Settings > Security > Users.
  10. Find the Application User created in step 3 and click on it.
  11. Click MANAGE ROLES.
  12. On the Manage User Roles dialog, find and select the Security Role created above.
  13. Click OK.
    clipboard_eeb15b4e67fe46454fd9650d622dc87db.png

Minimum Entities and Privileges Requirement

If you do not want to assign all privileges to the list of entities as discussed in Minimum Permission Security Role > point 5, then provide the Read-only privilege for the following three entities in the Customization tab.

  • Entity
  • Field
  • Relationship

NOTE: When the above permission and entities are selectedthe DLP Policy supports only the "Incident" response action. This response action can be seen while defining the DLP Policy for On-Demand Scan.

System Administrator Security Role

TIP: Using the System Administrator role is not recommended in a production environment. Please use the Minimum Permissions Security Role for production.

To assign system administrator security role to the application user:

  1. Click MANAGE ROLES.
    clipboard_e4c3c577658376804cb6311e6de9f3d11.png
  2. Under Manage User Roles, activate the System Administrator checkbox and click OK.
    clipboard_e09ef3dbf1c2379640d75602050da5b41.png

Step 5: Enable Skyhigh CASB API Connection

To complete the final steps of this guide, connect to Skyhigh CASB with your Dynamics instance. To enable API for Microsoft Dynamics 365 in Skyhigh CASB:

  1. Log in to Skyhigh CASB with your tenant and go to Settings > Service Management.
  2. Click Add Service Instance, and select Microsoft Dynamics 365.
  3. Enter a name for the instance and click Done.
    qa1.png
  4. Select the Microsoft Dynamics 365 instance you created. 
  5. Go to the Setup tab and under API, click Enable.
  6. On the Enable API page, click Provide API Credentials.
    qa2.png
  7. Extract the data from the Manifest file found in the Azure portal under the Custom OAuth app created in Step 1 to enter the following details:
    Picture 10.png
    • Client ID is the appId from the Manifest. Looks like a UUID, for example, 543bd03b-cd6e-417d-b31b-871ba0ef44f1
    • Private Key is the .pem file containing the private key which you created earlier (office365OfflineDlpKey.pem).
    • Thumb Print is the customKeyIdentifier of the keyCredentials of Manifest (Manifest screen is shown above). Looks like a short, base64 encoded string, for example, 4BDBCCC84D81B29D1E6A6E0976A120275B393A7C
    • Resource URL is the URL for the instance. Use your Dynamics custom domain. For example: https://<yourdomain>.crm.dynamics.com.
    • Admin Email. To find your Admin Email:
      • Go to Dynamics 365 > Security.
        clipboard_ee1d97db4bf4e00a3e752cf093d228775.png
      • Click Users and find the Application User created in Step 3. This displays the Application User’s information.
        Picture 9.png
      • Under User Information, make a note of Primary Email ID. This will be your Admin Email. Enter your Admin Email.
  8. Click Submit.
  9. Once the API is enabled, a successful message is displayed. Click Done.
    qa3.png
  10. You are redirected to the Overview tab. Now, you can see the enabled API Details.
    qa4.png
  • Was this article helpful?