How to use IBM App Connect with Microsoft Dynamics 365 for Sales
Microsoft Dynamics 365 for Sales is a customer relationship management solution that's designed to improve how you interact and do business with your customers.
- Cloud-managed connector
- Local connector in containers (Continuous Delivery release)
- Local connector in containers (Extended User Support release)
- Local connector in containers (Long Term Support release)
Connecting to Microsoft Dynamics 365 for Sales
Complete the connection fields that you see in the App Connect Designer Catalog page or flow editor. If necessary, work with your Microsoft Dynamics 365 for Sales administrator to obtain these values.
|Use the application's website to sign in (OAUTH 2.0 AUTH CODE)||App Connect on IBM® Cloud|
|Provide credentials for App Connect to use (BASIC OAUTH)||App Connect in containers|
|Provide a username, password, and client credentials (OAUTH 2.0 PASSWORD)||App Connect on IBM Cloud and App Connect in containers|
|Use the application's website to sign in (OAUTH 2.0 AUTH CODE)||Provide credentials for App Connect to use (BASIC OAUTH)||Provide a username, password, and client credentials (OAUTH 2.0 PASSWORD)|
|Service URL||Service URL||Service URL|
|API version (optional)||API version (optional)||API version (optional)|
|Access token||Client ID|
|Refresh token||Client secret|
|Service URL||URL that provides a direct sign-in to the Microsoft Dynamics 365 (online) service; for example,
Note: To know more about Service URL, see Discover the URL for your organization on the Microsoft Documentation page.
|API version (optional)||API version to be used; for example, v9.1.|
|Access token||Access token generated from the Application client ID and Application client secret.|
|Refresh token||Refresh token generated from the Application client ID and Application client secret.|
|Client ID||Unique identifier generated after Microsoft Azure app registration to tie requests to specific projects.|
|Client secret||Application client secret for the unique Application client ID created for a specific project.|
|Username||The username to log in to your Microsoft Dynamics 365 for Sales account.|
|Password||The password for the specified username.|
To generate these values and connect to Microsoft Dynamics 365 for Sales, you need to register an application with the required permissions in Microsoft Azure, which enables App Connect to integrate with Microsoft Dynamics 365 for Sales by using APIs and protocols.
- To register an application with Microsoft Azure, for use
with App Connect:Note: Choose the applicable steps based on the authorization method that you selected.
- Log in to the Microsoft Azure portal, and then click App registrations.
- If you have access to more than one tenant, switch to the tenant where you want to register the app by using the Directories + subscriptions filter in the banner and then click the Close icon (X) to return to the previous page.
- In the
App registrationspage, click New registration.
- In the
Register an applicationpage, specify a unique name for your app, select Accounts in any organizational directory (Any Azure AD directory - Multitenant) as the account type, and accept the default values for the remaining fields.
- Click Register. The Overview page for the
application is displayed.
- Make a note of the Application (client) ID value because you need to specify it as a connection value when creating the account (by using either OAUTH2_PASSWORD or BASIC_OAUTH authorization) in App Connect.
- To generate a client secret for your registered application:
- Next to Client credentials on the Overview page,
click Add a certificate or secret. This displays the
Certificates & secretspage.
- Click New client secret.
- In the
Add a client secretpanel, specify a description for the secret (for example, App Connect secret) and then select an expiry period.
- Click Add. The generated client secret is displayed on the
Certificates & secretspage.
- In the Add a client secret panel, specify a description for the secret, then select an Expiry periodand click Add
- Copy and store the client secret value because you need to specify it as a connection value when
creating the account (by using either OAUTH2_PASSWORD or
BASIC_OAUTH authorization) in App Connect.
If you are using BASIC_OAUTH authorization, you'll also need to specify the
client secret value while generating access and refresh tokens. Note: The client secret value won't be shown again in full after you leave this page.
- Next to Client credentials on the Overview page, click Add a certificate or secret. This displays the
- Configure the permissions that App Connect needs.
- In the left pane, click API permissions and then click
to add each of the
following permissions in turn. You can search for and select a permission, and then click
Read and write directory data.
(Allows App Connect to read and write data in your organization's directory, such as users, and groups.)
Maintain access to data that you have given it access to.
(Allows App Connect to see and update the data that you gave it access to, even when users are not currently using App Connect.)Note:
Directory.ReadWrite.Allrequires admin consent.
- If the status of any permission is shown as
Not granted for myDomain, click Grant admin consent for myDomain, where myDomain is your domain name. Then click Yes to confirm. (This updates the status of all permissions to
Granted for myDomain.)
- Again, go to .
- Select the
user_impersonationcheckbox, then click Add permissions.
- In the left pane, click API permissions and then click to add each of the following permissions in turn. You can search for and select a permission, and then click Add permissions.
- If you want to connect by using BASIC_OAUTH authorization, use an
application such as IBM API Connect Test and Monitor or Postman to submit a POST request to generate
an access token and a refresh token that will be used to interact with Microsoft Dynamics 365 for Sales on your behalf. Specify the following parameters:
- Request URL:
- Request parameters:
Key Value client_id Set this to the Application (client) ID value that was generated for your registered app. scope Directory.ReadWrite.All offline_access grant_type password client_secret Set this to the client secret value that was generated under Certificates & secrets for your registered app. userName Set this to the username that was used to log in to the Azure portal. password Set this to the associated password for the username.
- Request URL:
To connect to a Microsoft Dynamics 365 for Sales endpoint from the App Connect Designer Catalog page for the first time, expand Microsoft Dynamics 365 for Sales, then click Connect. For more information about ways to connect to Microsoft Dynamics 365 for Sales, see Managing accounts in App Connect.
Before you use the account that is created in App Connect in a flow, rename the account to something meaningful that helps you to identify it. To rename the account on the Catalog page, select the account, open its options menu (⋮), then click Rename Account.
Before you use App Connect Designer with Microsoft Dynamics 365 for Sales, take note of the following considerations:
- (General consideration) You can see lists of the trigger events and
actions that are available on the Catalog page of the App Connect Designer.
For some applications, the events and actions in the catalog depend on the environment (IBM Cloud Pak for Integration or App Connect on IBM Cloud) and whether the connector supports configurable events and dynamic discovery of actions. If the application supports configurable events, you see a Show more configurable events link under the events list. If the application supports dynamic discovery of actions, you see a Show more link under the actions list.
- (General consideration) If you are using multiple accounts for an application, the set of fields that is displayed when you select an action for that application can vary for different accounts. In the flow editor, some applications always provide a curated set of static fields for an action. Other applications use dynamic discovery to retrieve the set of fields that are configured on the instance that you are connected to. For example, if you have two accounts for two instances of an application, the first account might use settings that are ready for immediate use. However, the second account might be configured with extra custom fields.
Events and actions
Microsoft Dynamics 365 for Sales events
These events are for changes in this application that trigger a flow to start performing the actions in the flow.
Show configurable events... Events shown by default are pre-configured using optimized connectivity. More items are available when you have configured events that can trigger a flow by polling this application for new or updated objects. For more information about configurable events, see Configuring polled events to trigger flows.
Microsoft Dynamics 365 for Sales actions
These are actions on this application that you want a flow to complete.
- Create account
- Retrieve accounts
- Update account
- Update or create account
- Delete account
- Create contact
- Retrieve contacts
- Update contact
- Update or create contact
- Delete contact
- Create invoice
- Retrieve invoices
- Update invoice
- Update or create invoice
- Delete invoice
- Create lead
- Retrieve leads
- Update lead
- Update or create lead
- Delete lead
- Create order
- Retrieve orders
- Update order
- Update or create order
- Delete order
- Create product
- Retrieve products
- Update product
- Update or create product
- Delete product
More items are available when you have connected App Connect to Microsoft Dynamics 365 for Sales.
Use templates to quickly create flows for Microsoft Dynamics 365 for Sales
Learn how to use App Connect templates to quickly create flows that perform actions on Microsoft Dynamics 365 for Sales; for example, open the Templates gallery then search for Microsoft Dynamics 365 for Sales.