Open Navigation

Azure Active Directory

Microsoft's identity and access management cloud solution
On This Page

Overview

Azure Active Directory is a comprehensive, highly available identity and access management cloud solution that combines core directory services, advanced identity governance, and application access management.

In configuring a Tray app to integrate with Azure there are two very important points to be taken into consideration:

  1. The user who will be authenticating with Azure must have the right level of authority to register the Tray app with Azure.
  2. According to what operations you want to make use of, you should be aware of the individual permissions / scopes that the Tray app will access and set these accordingly when you are authenticating your Azure account in the Tray workflow.

Ensure the user has the authority to register the Tray.io app in Azure

If you are using an Azure account which has admin privileges, then you should already be able to access your Dynamics data through the Tray.io platform.

If not, then an Azure admin will need to set up access for the Tray app in one of three ways:

  1. Give all users the ability to consent to 3rd party apps accessing company data
  2. The Azure admin can login to Tray themselves in order to create the Authentication with their account
  3. An Azure admin can create a specific 'Tray app' user in Azure AD and give this user a specific role

The first option grants all users in your organisation the ability to log into Microsoft services through any 3rd party application. To enable this setting, an admin must sign into the Azure portal > Navigate to Azure Active Directory in the left hand navigation > Click on User Settings in the menu then Click on Enterprise applications > Manage how end users launch and view their applications > Click on yes to "Users can consent to apps accessing company data on their behalf"

apps-permissions

The second option requires an Azure admin to log into the Tray app to create an Authentication and consent on behalf of the organisation. This means no other user for your organisation should have to consent to the Tray.io app accessing data in your organisation's Azure AD instance.

The third option requires creating a 'Tray app' user in Azure and then going to Users > Select User > Directory Role > Add Role:

azure-add-role

For this user you will want to assign it the 'least priveleged role' in order for it to be able to carry out the operations you want.

There is a useful Microsoft guide on what roles are required for what tasks here

Authentication

When using the Azure AD connector, the first thing you will have to do is click on 'New Authentication' in the step editor:

add-auth

  1. You will then have to specify the Directory ID, which will be 'common' unless more than one directory has been set up. The Directory ID can be found in the Properties pane of the Directory in Azure Active Directory:

    azure-auth-1

  2. If you only need to List Users and access Basic Profile information, you can uncheck the User.ReadWrite.All scope, but leave the other two scopes (User.Read and Offline_access) checked. You should also add "User.ReadBasic.All" under Extra Scopes. The Offline_access box should always be ticked to prevent the access token from expiring and breaking your integration:

    ad-auth-basic-profile

    Microsoft has a useful list here of the extra scopes that you can add to fine-tune the access which the Tray app has to your Azure AD instance.

  3. After clicking 'Next' you can sign into your Microsoft account with the appropriate credentials.

  4. The Azure admin should be able to confirm the permissions delegated to the app in Azure Active Directory under Users > Click on the specific user > Applications > Click on the app > View Granted Permissions:

azure-view-app-granted-permissions

To access Full Profile information

If you need to access profile information that is not available as part of Basic Profile information, you will need access to users' Full Profile.

To do this you can follow exactly the same steps as for Basic Profile but when creating your authentication in Tray you should also add the User.Read.All scope which will allow the application to access Full Profile information of all users, but will also require the user logging in to be an Administrator.

ad-auth-full-profile

In Azure Active Directory > Users > Directory Role:

ad-app-dev-role

Example - List Users

  1. Create a new workflow with a Manual Trigger and add an Azure AD connector

    ad-connector

  2. Select the List Users operation and choose an appropriate limit for the number of users to return:

    azure-list-users

  3. Click Run Workflow Now. Then select the Debug tab and you should be able to see a successful run of the workflow to click on and view the successful output of the workflow run:

    ad-list-users-log

Was this article helpful?
Yes
No
On This Page