From Bright Pattern Documentation
Jump to: navigation, search
Line 12: Line 12:
  
 
== Step 2: Add API access ==
 
== Step 2: Add API access ==
# In the newly created app, go to ''Required Permissions > APIs > Add'' to add API access.<br /><br>[[File:MS365-12-53.png|800px|thumbnail|center|Add API access]]<br /><br>
+
# In the newly created app, go to '' Settings > API Access > Required Permissions'' and click '''Add''' to add API access.<br /><br>[[File:MS365-12-53.png|800px|thumbnail|center|Add API access]]<br /><br>
 
# In ''Add API access'', make the following selections:<br /><br>
 
# In ''Add API access'', make the following selections:<br /><br>
## In ''Select an API'', select '''Dynamics CRM Online API'''.<br /><br>
+
## In ''Select an API'', select '''Dynamics CRM Online'''.<br /><br>
 
## Select the checkbox for '''Delegated Permissions'''.<br /><br>
 
## Select the checkbox for '''Delegated Permissions'''.<br /><br>
## When done, click '''Grant Permissions'''.<br /><br>
+
## When done, click '''Grant Permissions''' and click '''Yes'''.<br /><br>
  
 
== Step 3: Get the key (the Client Secret) and endpoint ==
 
== Step 3: Get the key (the Client Secret) and endpoint ==
# In the newly created app, go to ''Keys'' and:<br /><br>
+
# In the newly created app, go to ''Settings > API Access > Keys'' and:<br /><br>
 
## In ''Description'', name the app key.<br /><br>
 
## In ''Description'', name the app key.<br /><br>
 
## In ''Expires'', set '''Never expires'''.<br /><br>
 
## In ''Expires'', set '''Never expires'''.<br /><br>
 
## Click '''Save'''. Once saved, the key value will be shown. The key value is the ''Client Secret'', which you need for later configuration steps.<br /><br>
 
## Click '''Save'''. Once saved, the key value will be shown. The key value is the ''Client Secret'', which you need for later configuration steps.<br /><br>
 
## '''Copy the key value now''' because this is the only moment you can see the actual key.<br /><br>[[File:MS365-13-53.png|800px|thumbnail|center|The key is the Client Secret]]<br /><br>
 
## '''Copy the key value now''' because this is the only moment you can see the actual key.<br /><br>[[File:MS365-13-53.png|800px|thumbnail|center|The key is the Client Secret]]<br /><br>
# Go to ''App Registrations > Endpoints'' and copy the '''OAUTH 2.0 Authorization Endpoint''' and '''OAUTH 2.0 Token Endpoint''' values.<br /><br>[[File:MS365-14-53.png|800px|thumbnail|center|OAUTH 2.0 endpoint values]]<br /><br>
+
# Go back to ''Azure Active Directory > App Registrations'' and click '''Endpoints'''.<br /><br />
 +
# Copy the '''OAUTH 2.0 Authorization Endpoint''' and '''OAUTH 2.0 Token Endpoint''' values.<br /><br>[[File:MS365-14-53.png|800px|thumbnail|center|OAUTH 2.0 endpoint values]]<br /><br>
  
 
== Step 4: Update security roles ==
 
== Step 4: Update security roles ==

Revision as of 00:19, 4 April 2019

• 5.19 • 5.3 • 5.8

<translate>

Configure Microsoft Azure and Dynamics 365 CRM for Web API access

Step 1: Add new registered app

  1. In the Azure Portal > Azure Active Directory > App Registrations, click + New registration to add a new registered app.

  2. View the registered app and click Settings.

  3. Then click Properties, and edit the properties with the following values:

    1. Application type - Web app / API

    2. Application ID - The Client ID

    3. Object ID - This ID will be filled in for the registered app

    4. Home page - http://localhost [Note: use exactly this value as it also will be hardcoded in the Azure Portal]

      App registration fields


Step 2: Add API access

  1. In the newly created app, go to Settings > API Access > Required Permissions and click Add to add API access.

    Add API access


  2. In Add API access, make the following selections:

    1. In Select an API, select Dynamics CRM Online.

    2. Select the checkbox for Delegated Permissions.

    3. When done, click Grant Permissions and click Yes.

Step 3: Get the key (the Client Secret) and endpoint

  1. In the newly created app, go to Settings > API Access > Keys and:

    1. In Description, name the app key.

    2. In Expires, set Never expires.

    3. Click Save. Once saved, the key value will be shown. The key value is the Client Secret, which you need for later configuration steps.

    4. Copy the key value now because this is the only moment you can see the actual key.

      The key is the Client Secret


  2. Go back to Azure Active Directory > App Registrations and click Endpoints.

  3. Copy the OAUTH 2.0 Authorization Endpoint and OAUTH 2.0 Token Endpoint values.

    OAUTH 2.0 endpoint values


Step 4: Update security roles

  1. Open the Dynamics 365 CRM (not Azure) application, and go to Settings > Security > Security Roles.

    1. Add new role (or copy existing role).

    2. Make sure the role has required privileges (the screenshot shown only grants access to the Account CRM object).

      Role assignment


Step 5: Add app users

  1. Go to Settings > Security > Users.

    1. Switch view to Application Users.

      Application Users view


  2. Add new user.

    1. Once new user form is shown, change it to Application User.

      User account information


  3. In Account Information, fill in the following:

    1. User Name

    2. Application ID - Your application ID (i.e., the Client ID)

  4. In User Information, fill in the following:

    1. Full Name - User's first name and last name

    2. Primary Email - User's email address

      Completed New User record


  5. Save the record. At this time, the Application ID URI and Azure AD Object ID fields are filled in.

    Save user record


Step 6: Add roles to the users you created

  1. Click Manage Roles.

    1. In Manage User Roles, add the custom role created to that user.

      Manage User Roles



This completes Microsoft Dynamics 365 CRM and Azure configuration.


</translate>

< Previous | Next >