3 Steps to Integrate Microsoft Dynamics 365 Sales Using Web API

by

The Truto Team

Posted

Jan 11, 2023

This blog will act as a reference for creating an OAuth web application for Microsoft Dynamics 365 Sales to interact with the Web API. We have done the grunt work and have listed out just the resources you need to integrate.

This post is not an in-depth tutorial on how to build OAuth apps in general, some prior knowledge of how OAuth apps work is required.

Prerequisites

You'd need a onmicrosoft.com account. If you don't have one, signup here.

At the end of the signup flow, you will end up at the Power Platform admin center. Just click "Cancel" when prompted to create an Environment.

Sign up for Dynamics 365 Sales

  1. Visit Dynamics 365 Sales Free Trial page and click on Try for free.

  2. Enter your onmicrosoft.com email and click "Start your free trial".

Create an application on Azure AD

  1. Visit the App registration page on Azure AD

  2. Click "New Registration"

3. Enter in the details of the app, with the redirect URI.

4. Select the account type based on whether you want to make this OAuth app available to others (Multitenant) or if you want to use it only in your organization (Single tenant).

5. Submit the form by clicking "Register"

6. You can get your OAuth Client ID in the Overview tab, copy and store it somewhere.

  1. On the app details page, click "Manifest" on the sidebar and change the value of  allowPublicClient in the JSON editor to true

8. Click "API permissions" and click "Add a permission"'

9. Select "Dynamics CRM"

10. Check "user_impersonation" permission and click "Add permissions" at the bottom.

11. You can also grant admin consent for your organization by clicking, "Grant admin consent for ..."

12. Click "Certificates & secrets" and click "New client secret"

13. Enter a friendly name for the secret and click "Add"

14. You will be shown the Client Secret for the OAuth app, copy it and store it somewhere safe.

Post creating an OAuth application, you can either use Microsoft's Authentication libraries to add OAuth flow into your web application or any other OAuth client library, you can find the OAuth URLs and flows here.

IMPORTANT: When doing OAuth flow using a non-Microsoft library, add the Web API endpoint (which you'll find in the next section) as part of the scope. For example, if your Web API endpoint is https://abcd.api.crm.dynamics.com/, then add the following to the scope parameter -> https://abcd.api.crm.dynamics.com/.default

You can also test out the Dynamics 365 Sales API using Postman by following the instructions here.

Get your Web API Endpoint

  1. Visit Power Apps dashboard.

  2. Click the Environment selector on the top right and select the "Sales Trial" environment. This environment is created when you sign up for the trial of Dynamics 365 Sales on the first step.

3. Click the Cog icon beside the Environment selector and click "Developer resources"

4. The Web API endpoint will be listed.

For information on how to make requests, refer the guide by Microsoft here.

For information about the entities of Dynamics 365 Sales, refer the Web API reference.

Following these steps will you put on the right path to integrating Microsoft Dynamics 365 Sales CRM.

Are you looking to natively integrate with all leading CRMs such as HubSpot, Close, Pipedrive, Freshsales, and Copper? Use Truto.one for free. It’s built for developers by developers to natively integrate all CRMs in one go.

If you have any questions or run into a roadblock, feel free to reach out to us at [email protected], we’ll be happy to help.

This blog will act as a reference for creating an OAuth web application for Microsoft Dynamics 365 Sales to interact with the Web API. We have done the grunt work and have listed out just the resources you need to integrate.

This post is not an in-depth tutorial on how to build OAuth apps in general, some prior knowledge of how OAuth apps work is required.

Prerequisites

You'd need a onmicrosoft.com account. If you don't have one, signup here.

At the end of the signup flow, you will end up at the Power Platform admin center. Just click "Cancel" when prompted to create an Environment.

Sign up for Dynamics 365 Sales

  1. Visit Dynamics 365 Sales Free Trial page and click on Try for free.

  2. Enter your onmicrosoft.com email and click "Start your free trial".

Create an application on Azure AD

  1. Visit the App registration page on Azure AD

  2. Click "New Registration"

3. Enter in the details of the app, with the redirect URI.

4. Select the account type based on whether you want to make this OAuth app available to others (Multitenant) or if you want to use it only in your organization (Single tenant).

5. Submit the form by clicking "Register"

6. You can get your OAuth Client ID in the Overview tab, copy and store it somewhere.

  1. On the app details page, click "Manifest" on the sidebar and change the value of  allowPublicClient in the JSON editor to true

8. Click "API permissions" and click "Add a permission"'

9. Select "Dynamics CRM"

10. Check "user_impersonation" permission and click "Add permissions" at the bottom.

11. You can also grant admin consent for your organization by clicking, "Grant admin consent for ..."

12. Click "Certificates & secrets" and click "New client secret"

13. Enter a friendly name for the secret and click "Add"

14. You will be shown the Client Secret for the OAuth app, copy it and store it somewhere safe.

Post creating an OAuth application, you can either use Microsoft's Authentication libraries to add OAuth flow into your web application or any other OAuth client library, you can find the OAuth URLs and flows here.

IMPORTANT: When doing OAuth flow using a non-Microsoft library, add the Web API endpoint (which you'll find in the next section) as part of the scope. For example, if your Web API endpoint is https://abcd.api.crm.dynamics.com/, then add the following to the scope parameter -> https://abcd.api.crm.dynamics.com/.default

You can also test out the Dynamics 365 Sales API using Postman by following the instructions here.

Get your Web API Endpoint

  1. Visit Power Apps dashboard.

  2. Click the Environment selector on the top right and select the "Sales Trial" environment. This environment is created when you sign up for the trial of Dynamics 365 Sales on the first step.

3. Click the Cog icon beside the Environment selector and click "Developer resources"

4. The Web API endpoint will be listed.

For information on how to make requests, refer the guide by Microsoft here.

For information about the entities of Dynamics 365 Sales, refer the Web API reference.

Following these steps will you put on the right path to integrating Microsoft Dynamics 365 Sales CRM.

Are you looking to natively integrate with all leading CRMs such as HubSpot, Close, Pipedrive, Freshsales, and Copper? Use Truto.one for free. It’s built for developers by developers to natively integrate all CRMs in one go.

If you have any questions or run into a roadblock, feel free to reach out to us at [email protected], we’ll be happy to help.

This blog will act as a reference for creating an OAuth web application for Microsoft Dynamics 365 Sales to interact with the Web API. We have done the grunt work and have listed out just the resources you need to integrate.

This post is not an in-depth tutorial on how to build OAuth apps in general, some prior knowledge of how OAuth apps work is required.

Prerequisites

You'd need a onmicrosoft.com account. If you don't have one, signup here.

At the end of the signup flow, you will end up at the Power Platform admin center. Just click "Cancel" when prompted to create an Environment.

Sign up for Dynamics 365 Sales

  1. Visit Dynamics 365 Sales Free Trial page and click on Try for free.

  2. Enter your onmicrosoft.com email and click "Start your free trial".

Create an application on Azure AD

  1. Visit the App registration page on Azure AD

  2. Click "New Registration"

3. Enter in the details of the app, with the redirect URI.

4. Select the account type based on whether you want to make this OAuth app available to others (Multitenant) or if you want to use it only in your organization (Single tenant).

5. Submit the form by clicking "Register"

6. You can get your OAuth Client ID in the Overview tab, copy and store it somewhere.

  1. On the app details page, click "Manifest" on the sidebar and change the value of  allowPublicClient in the JSON editor to true

8. Click "API permissions" and click "Add a permission"'

9. Select "Dynamics CRM"

10. Check "user_impersonation" permission and click "Add permissions" at the bottom.

11. You can also grant admin consent for your organization by clicking, "Grant admin consent for ..."

12. Click "Certificates & secrets" and click "New client secret"

13. Enter a friendly name for the secret and click "Add"

14. You will be shown the Client Secret for the OAuth app, copy it and store it somewhere safe.

Post creating an OAuth application, you can either use Microsoft's Authentication libraries to add OAuth flow into your web application or any other OAuth client library, you can find the OAuth URLs and flows here.

IMPORTANT: When doing OAuth flow using a non-Microsoft library, add the Web API endpoint (which you'll find in the next section) as part of the scope. For example, if your Web API endpoint is https://abcd.api.crm.dynamics.com/, then add the following to the scope parameter -> https://abcd.api.crm.dynamics.com/.default

You can also test out the Dynamics 365 Sales API using Postman by following the instructions here.

Get your Web API Endpoint

  1. Visit Power Apps dashboard.

  2. Click the Environment selector on the top right and select the "Sales Trial" environment. This environment is created when you sign up for the trial of Dynamics 365 Sales on the first step.

3. Click the Cog icon beside the Environment selector and click "Developer resources"

4. The Web API endpoint will be listed.

For information on how to make requests, refer the guide by Microsoft here.

For information about the entities of Dynamics 365 Sales, refer the Web API reference.

Following these steps will you put on the right path to integrating Microsoft Dynamics 365 Sales CRM.

Are you looking to natively integrate with all leading CRMs such as HubSpot, Close, Pipedrive, Freshsales, and Copper? Use Truto.one for free. It’s built for developers by developers to natively integrate all CRMs in one go.

If you have any questions or run into a roadblock, feel free to reach out to us at [email protected], we’ll be happy to help.

This blog will act as a reference for creating an OAuth web application for Microsoft Dynamics 365 Sales to interact with the Web API. We have done the grunt work and have listed out just the resources you need to integrate.

This post is not an in-depth tutorial on how to build OAuth apps in general, some prior knowledge of how OAuth apps work is required.

Prerequisites

You'd need a onmicrosoft.com account. If you don't have one, signup here.

At the end of the signup flow, you will end up at the Power Platform admin center. Just click "Cancel" when prompted to create an Environment.

Sign up for Dynamics 365 Sales

  1. Visit Dynamics 365 Sales Free Trial page and click on Try for free.

  2. Enter your onmicrosoft.com email and click "Start your free trial".

Create an application on Azure AD

  1. Visit the App registration page on Azure AD

  2. Click "New Registration"

3. Enter in the details of the app, with the redirect URI.

4. Select the account type based on whether you want to make this OAuth app available to others (Multitenant) or if you want to use it only in your organization (Single tenant).

5. Submit the form by clicking "Register"

6. You can get your OAuth Client ID in the Overview tab, copy and store it somewhere.

  1. On the app details page, click "Manifest" on the sidebar and change the value of  allowPublicClient in the JSON editor to true

8. Click "API permissions" and click "Add a permission"'

9. Select "Dynamics CRM"

10. Check "user_impersonation" permission and click "Add permissions" at the bottom.

11. You can also grant admin consent for your organization by clicking, "Grant admin consent for ..."

12. Click "Certificates & secrets" and click "New client secret"

13. Enter a friendly name for the secret and click "Add"

14. You will be shown the Client Secret for the OAuth app, copy it and store it somewhere safe.

Post creating an OAuth application, you can either use Microsoft's Authentication libraries to add OAuth flow into your web application or any other OAuth client library, you can find the OAuth URLs and flows here.

IMPORTANT: When doing OAuth flow using a non-Microsoft library, add the Web API endpoint (which you'll find in the next section) as part of the scope. For example, if your Web API endpoint is https://abcd.api.crm.dynamics.com/, then add the following to the scope parameter -> https://abcd.api.crm.dynamics.com/.default

You can also test out the Dynamics 365 Sales API using Postman by following the instructions here.

Get your Web API Endpoint

  1. Visit Power Apps dashboard.

  2. Click the Environment selector on the top right and select the "Sales Trial" environment. This environment is created when you sign up for the trial of Dynamics 365 Sales on the first step.

3. Click the Cog icon beside the Environment selector and click "Developer resources"

4. The Web API endpoint will be listed.

For information on how to make requests, refer the guide by Microsoft here.

For information about the entities of Dynamics 365 Sales, refer the Web API reference.

Following these steps will you put on the right path to integrating Microsoft Dynamics 365 Sales CRM.

Are you looking to natively integrate with all leading CRMs such as HubSpot, Close, Pipedrive, Freshsales, and Copper? Use Truto.one for free. It’s built for developers by developers to natively integrate all CRMs in one go.

If you have any questions or run into a roadblock, feel free to reach out to us at [email protected], we’ll be happy to help.

In this article

Content Title

Content Title

Content Title

Learn how Truto helps product teams build integrations faster

by

The Truto Team

Posted

Jan 11, 2023

LinkedIn
Twitter Logo
Link

In this article

3 Steps to Integrate Microsoft Dynamics 365 Sales Using Web API

More from our Blog

All Posts

Launching FetchDB: A drop-in MongoDB Atlas Data API Alternative

A seamless alternative to the MongoDB Atlas Data API. Without any change to your current logic.

All Posts

Launching FetchDB: A drop-in MongoDB Atlas Data API Alternative

A seamless alternative to the MongoDB Atlas Data API. Without any change to your current logic.

All Posts

Launching FetchDB: A drop-in MongoDB Atlas Data API Alternative

A seamless alternative to the MongoDB Atlas Data API. Without any change to your current logic.

Security

Successfully Completed SOC 2 Type II Audit for Year 2 | Truto

Truto completes its SOC 2 Type II audit for Year 2 successfully. Learn more about what this means for our customers.

Security

Successfully Completed SOC 2 Type II Audit for Year 2 | Truto

Truto completes its SOC 2 Type II audit for Year 2 successfully. Learn more about what this means for our customers.

Security

Successfully Completed SOC 2 Type II Audit for Year 2 | Truto

Truto completes its SOC 2 Type II audit for Year 2 successfully. Learn more about what this means for our customers.

Guides

Separating the API Integration Layer for Optimal Integration Design: Insights from Lalit, CTO at Clearfeed.ai

Learn why separating the API integration layer from your app is critical for a fail-safe integration architecture from Lalit, CTO at Clearfeed.ai

Guides

Separating the API Integration Layer for Optimal Integration Design: Insights from Lalit, CTO at Clearfeed.ai

Learn why separating the API integration layer from your app is critical for a fail-safe integration architecture from Lalit, CTO at Clearfeed.ai

Guides

Separating the API Integration Layer for Optimal Integration Design: Insights from Lalit, CTO at Clearfeed.ai

Learn why separating the API integration layer from your app is critical for a fail-safe integration architecture from Lalit, CTO at Clearfeed.ai

Take back focus where it matters. Let Truto do integrations.

Learn more about our unified API service and solutions. This is a short, crisp 30-minute call with folks who understand the problem of alternatives.

Take back focus where it matters. Let Truto do integrations.

Learn more about our unified API service and solutions. This is a short, crisp 30-minute call with folks who understand the problem of alternatives.

Take back focus where it matters. Let Truto do integrations.

Learn more about our unified API service and solutions. This is a short, crisp 30-minute call with folks who understand the problem of alternatives.

Did our integrations roster hit the spot?

© Yin Yang, Inc. 2024. All rights reserved.

9450 SW Gemini Dr, PMB 69868, Beaverton, Oregon 97008-7105, United States

Did our integrations roster hit the spot?

© Yin Yang, Inc. 2024. All rights reserved.

9450 SW Gemini Dr, PMB 69868, Beaverton, Oregon 97008-7105, United States

Did our integrations roster hit the spot?

© Yin Yang, Inc. 2024. All rights reserved.

9450 SW Gemini Dr, PMB 69868, Beaverton, Oregon 97008-7105, United States