Azure AD Setup for EasyTerritory v3+


EasyTerritory (version 3.x+) supports Azure Active Directory (Azure AD) using ADAL.JS.  Azure AD is a Single sign-on (SSO) feature that enables a user to login to the EasyTerritory application through Azure AD.  Azure AD will authenticate the user using Active Directory credentials and direct them to EasyTerritory to access the application.  Additionally, Azure AD at EasyTerritory v3 supports Advanced Find mapping results from a Dynamics 365 instance to EasyTerritory without the Dynamics 365 credentials prompt previously experienced in EasyTerritory v2.x and earlier.


The advantages of leveraging Azure AD with your EasyTerritory application are:

  • – Simple streamlined SSO access to your EasyTerritory application and Dynamics 365 instance through company’s Azure AD portal.
  • – Strengthens security with users not needing to remember additional usernames and passwords.
  • – Ability for companies to control users’ access to EasyTerritory within their Active Directory.
  • – End-to-end authentication for Dynamics 365 FetchXML layers (Advanced Find mapping).
  • – Supports multi-factor authentication (MFA).


You will need to be an Office 365 admin and have access to the Microsoft Azure Portal for your organization.

Azure AD Configuration Steps:

    1. Login to the Azure Portal ( and click ‘Azure Active Directory’


    1. Then select ‘App Registrations’


    1. Click ‘+ New application registration’


    1. Set a ‘Name’ for your configuration, Choose ‘Application type’ = Web app / API’, set your ‘Sign-on URL’ = ‘’ (replacing GUID with your customer GUID). Save the settings.


    1. Click ‘Settings’, then click ‘Reply URLs’ in the panel that appears.

      Add the following three reply URLs. ‘{DEV}{TEST}{APP}/’ and ‘{DEV}{TEST}{APP}/index.html’ and ‘{DEV}{TEST}{APP}/index.aspx’ (replacing GUID with your customer GUID and setting DEV/TEST/APP to correspond to your instance type. APP = PROD)


    1. Click ‘Required permissions’ and select ‘Windows Azure Active Directory’.

      Check the items shown below and click ‘Save’.

      Next, click ‘Grant Permissions’


    1. OPTIONAL: If connecting to Dynamics 365, add access to the API. Click ‘+ Add’ then click ‘Select an API”. In the search box, search for ‘Dynamics CRM Online (Microsoft.CRM)’ and select it.

      Select the following delegated permissions and ‘Save’.

      Click ‘Grant Permissions’


    1. Next, setup an Application Key. Note: You will need to copy it out as the UI will never let you get back to it after the blade closes. The Key will be pasted into an EasyTerritory setting on the last step.


    1. Click ‘Manifest’ button and update the following properties to ‘true’ and click ‘Save’.


  1. Get the Application ID and OAuth endpoints for copying into the EasyTerritory settings panel.
    Get the Application ID here:

    Get the OAuth Endpoint by clicking here:

    Copy the OAuth endpoint. Note: You’ll only need the part of the UI in bold.

  2. Click ‘Azure Active Directory’ then click ‘Enterprise applications’.

  3. Find the EasyTerritory instance that was created and click it.


  4. Click ‘Users and groups’ then click ‘+ Add user’.

EasyTerritory Configuration Steps:

    1. With an EasyTerritory ‘Admin’ account into EasyTerritory go to the admin settings panel and set the following properties created in the steps above.

      Save the settings and open the EasyTerritory application in a new browser session to test.


  1. By default, EasyTerritory with Azure AD enabled, we’ll redirect to the IDP sign-on page in the browser. If you would like to embed EasyTerritory with a dashboard using an iFRAME in Dynamics 365, you’ll need to append this querystring property onto the iFRAME URL ?useAdalPopup=true.

    For example,{YOUR GUID}/APP/index.html?projectId={YOUR PROJECT GUID}&useAdalPopup=true

    If you run into any issues setting up Azure AD, please email