Skip to main content
All CollectionsAPI and web services
Creating a Microsoft Dynamics CRM integration in your Betty Blocks application
Creating a Microsoft Dynamics CRM integration in your Betty Blocks application
Betty Blocks avatar
Written by Betty Blocks
Updated over a year ago

Warning!

This is a legacy document. The features described below are only usable within the classic-generation environment.

Currently, Betty Blocks offers faster and more advanced options that are available in next-gen. Before you start working on some new features in your application, consider doing it using the next-gen version. In particular, you might find it useful to check out Using the HTTPS action step and Setting your remote data source articles.

Good luck!


This article assumes you already have a working Dynamics 365 application and a Betty Blocks application ready for use.

  1. Login to Azure Portal ( Use the same credentials as your Dynamics account, if it asks you to sign up and set up trial, you can do that)

  2. Once you have logged in, navigate to the option “Azure Active Directory” and click on “App registration

  1. Click on “New application registration”.

  2. Add the name of the application and select the Application type as “Web App / API”.

  3. In the Sign-ON URL field enter the following URL: https://<appname>.bettyblocks/oauth2/callback

  1. It will take some and create the application for you ( Note down the Application ID, you would need it when connecting to Dynamics).

  2. Click on the Settings from the application created and then on Required Permissions:

  1. Now Click on Add.

  2. Select Dynamics CRM Online from Drop Down and click on select:

  1. It will move to the next step “Select Permissions“, select the “Access Dynamics CRM as organization users” option, and click on Select again.

  1. Click on Done. It will take some time.

  2. The next thing that we need is an API key. Open the Settings -> API ACCESS -> Keys. 

  3. Enter a Description and fill the Expires fields.

  1. Copy the generated key value. You won't be able to retrieve it later.

  2. This part is done! The setup is completed, now you can use this app’s Application ID as a Client ID in your Betty Blocks application.

  1. Now create a new webservice in your Betty Blocks application. The host field is <add your environment name, like ‘myorg.crm’>.dynamics.com.

  1. After saving the webservice, open the generated authentication settings. Give the authentication a friendly name, use these settings:

  2. Authorization uri: https://login.microsoftonline.com/common/oauth2/authorize?resource=https://<add your environment name, like ‘myorg.crm’>.dynamics.com.

  3. Client: the application ID that we previously wrote down.

  4. Client secret: the generated password that we previously wrote down.

  1. After saving the authentication, press 'Connect'. You will be redirected.

  1. Press 'Accept'. If everything is OK you will be redirected back to your Betty Blocks application.

  1. With our authentication in place, we can go back to our webservice definition and add a test endpoint. We will create a GET endpoint to fetch all the accounts in our Dynamics CRM. We use the path '/api/data/v9.0/accounts'. 

  1. After saving the endpoint we can use the 'Run test' button to make sure that everything works as expected.

  1. Luckily everything works fine! We successfully fetched all the accounts in our Dynamics CRM.

  2. To do something with the result of the webservice you can follow the general webservices tutorial.

Did this answer your question?