ERP, CRM and Cloud Apps | Microsoft Gold Partner | Alphavima

March 28th, 2025

How to Connect Microsoft Dynamics 365 CRM to SQL Server (SSMS)

Many organizations struggle to make sense of all the customer data they collect. While Microsoft Dynamics 365 CRM helps manage relationships, gaining real insights often requires going a step further—like connecting it to SQL Server. This integration lets teams run powerful queries, analyze real-time data, and create custom dashboards using familiar tools like SQL Server Management Studio (SSMS).

Setting this up is simpler than it sounds. By enabling the TDS endpoint through the Power Platform, you can unlock read-only access to CRM data for advanced analysis. If you’re unsure where to begin, Alphavima’s IT Advisory Services can guide you through setup, governance, and long-term optimization.

However, raw data is just the beginning; to harness its true power, we need to delve into the realm of Data Analytics.

To analyze D365 CRM database using SQL Server Management Studio, below are the steps to connect to MS SQL Server.

  1. Login to https://admin.powerplatform.microsoft.com/ using administrator credentials.
Navigating to Environments in Power Platform to connect D365 CRM to SQL Server

2. In Environments section, click on the environment for which you want to enable D365 CRM CDS for MS SQL Server.

Selecting CRM environment to connect Dynamics 365 to SQL Server

3. Click on “Settings” in header section

Accessing Settings tab for CRM environment in Power Platform

4. On the Settings page, Click on Product and then click on Features

Navigate to Features section under product settings to connect D365 CRM to SQL Server

5. Enable TDS Endpoint and click “Save”.

Enabling TDS endpoint to connect D365 CRM with SQL Server

6. Now D365 CRM CDS to connect it from MS SQL Server have been successfully enabled.

Steps to Connect Microsoft Dynamics 365 CRM to SQL Server Database in SSMS

  1. Open SQL Server Management Studio.
  2. In connect to SQL Server Window enter Server name (It will be your D365 CRM URL) e.g. of server name yourdomain.crm.dynamics.com.
  3. Select Authentication as Azure Active Directory – Universal with MFA
  4. Enter Username: Your user id e.g. admin@xyz.com
  5. Click Connect. You will be redirected to a browser for password authentication
Logging into SQL Server with Azure AD to access D365 CRM

6. Now you have successfully connected to D365 CRM database

Executing SQL query on D365 CRM database in SSMS

7. Now you can write query and execute it to test if its working.

This can save lots of time to analyse, reconcile data to its grain level.

FAQs

How can I connect Dynamics 365 CRM to SQL Server Management Studio (SSMS)?

Follow the steps to enable the TDS endpoint in your D365 environment, then use SSMS with Azure Active Directory authentication to connect. For a **comprehensive Microsoft Dynamics 365 implementation**, visit CRM Implementation Services.

What permissions are required to connect D365 CRM to SQL Server?

Administrator access to Dynamics 365 CRM and appropriate permissions within SSMS are required for a successful connection.

What authentication method should I use for connecting D365 CRM in SSMS?

Use Azure Active Directory - Universal with MFA for secure authentication. If security is your priority, explore Microsoft Sentinel for advanced cloud security solutions.

Why is the TDS endpoint important for connecting Microsoft Dynamics 365 to SSMS?

The TDS endpoint allows SSMS to access Microsoft Dynamics 365 CRM data directly, facilitating easier data analysis and management.

Can I run SQL queries on the D365 CRM database using SSMS?

Yes, after establishing the connection, you can run read-only SQL queries on the Dynamics 365 data.

Is there any data restriction when accessing Dynamics 365 CRM from SSMS?

Only specific tables and entities are accessible, with read-only permissions, ensuring data security within the CRM environment.

    Get in Touch


    Notice: Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.) in /home/design.alphavima.ca/public_html/wp-includes/functions.php on line 6121