1. Create a ZenContract Application in your Azure account
First, you will need to make sure that your login to your Microsoft Azure organization account has global admin privileges. If you have that, then log in!
Once you're in, navigate to Azure Directory / Manage / App Registration.
Under the App Registrations tab, select the New Registration button.
In the new registration form, provide the name of your application - in this case, ZenContract.
Under Supported Account Types select "Accounts in any organizational directory (Any Azure AD directory - Multitenant)" option.
In the Re-Direct URL value, use this link: https://my.zencontract.com/edge/Account/AzureToken
Then, click the Register button.
2. Authentication Setup
Under the Overview tab of the created application, copy the Client ID and Tenant ID and paste them into Notepad or Word for usage later. You will need these to authenticate in ZenContract.
Once you have copied and stored both of these items, go the the Authentication tab. For the Front-Channel Logout URL value, use this link: https://my.zencontract.com/system/user.
In the Implicit Grant and Hybrid Flows field, tick or enable the "Access Token" checkbox.
Click Save.
3. Client Secret
In the same area, click on the Certificates and Secrets tab.
Click New Client Secret. Add in a description, for example "ZenContract integration", and choose the Expiry for the secret.
Click on the Add button at the bottom of the screen.
After successfully adding the Client Secret, make sure you copy the Client Secret Value and paste it into Notepad or Word for usage later.
NOTE: You will see two Client Secret fields, "Value" and "Secret ID". Please copy the "Value" field, not the "Secret ID". Copy the Client Secret value quickly once created, as this will be shown to the user only once.
4. Add API Permission for Office365
In the same app area, navigate down to API Permissions.
Click on Add a Permission and then select Microsoft Graph API.
After selecting Microsoft Graph API, add the following permissions:
Delegate Permission:
- Mail.Send
- Offline_access
- Sites.ReadWriteAll
There is a little "Add Permission" button at the bottom of the page so make sure you click on that when adding new permissions.
5. Add API Permission for Dynamic365
In order to call Dynamics Organization data and information, you need to add Dynamics API permission.
In the same API Permissions area, click on Add a Permission and add Dynamics API.
Add the Delegate Permission user_impersonation.
6. Grant Admin Consent for Azure Application
In the API Permissions tab, select the Grant admin consent for ZenContract button. This will allow all the added permissions to integrate with the ZenContract website.
7. Enter details into ZenContract
Finally, log into ZenContract. Click on Admin/Settings in the menu.
Click on the Integrations tab and navigate to Microsoft Azure in the integration area.
Paste in the Azure Client ID, Azure Tenant ID and the Azure Client Secret (Value) that you created in the earlier steps, and Click the blue Save Changes button. You're done!
Please download the attached file at the end of this article to get a fuller version of this integration setup.