Alphavima Technologies

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.

Connect Dynamics 365 CRM with SQL Server

Alphavima supports businesses in setting up Dynamics 365 CRM connections to SQL Server. We help configure, integrate, and guide you through using SSMS for data queries and reporting.

Diagram showing Dynamics 365 CRM connected to SQL Server database

FAQs

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

To establish a D365 CRM SQL connection, you must enable the TDS endpoint in your environment and then connect using SSMS with Azure Active Directory authentication. For a step-by-step guide, refer to Microsoft’s official documentation on SQL access.

What permissions are required to set up a D365 CRM SQL connection?

The connection can be enabled only by administrators who have access to the Power Platform admin center. Additionally, sufficient database rights must be provided to ensure a secure SQL Server integration.

Which authentication method should be used for Microsoft Dynamics CRM SSMS integration?

For Microsoft Dynamics CRM SSMS integration, Azure Active Directory – Universal with MFA is the recommended authentication method. This ensures both secure access and compliance with organizational IT policies.

Why is the TDS endpoint important for connecting Microsoft Dynamics 365 CRM to SQL Server?

The TDS endpoint is required because it allows SQL-based tools like SSMS to query CRM data in real time. Without enabling this feature, direct database access to Dynamics 365 CRM is not possible.

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

Yes, SQL queries can be executed to retrieve read-only CRM data once the D365 CRM SQL connection is enabled. However, write operations and schema modifications are restricted for security reasons.

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

When Microsoft Power Platform SQL access is enabled, only read-only data can be queried from CRM. This restriction helps prevent accidental changes while still allowing deep analysis and reporting.

How does Microsoft Power Platform SQL access improve reporting and analytics?

By enabling SQL access, teams can connect Dynamics 365 CRM data to reporting tools like Power BI. As a result, advanced dashboards and analytics can be created without relying solely on CRM’s built-in reports.

What common issues may occur during Microsoft Dynamics CRM SSMS integration?

Errors are often caused by missing permissions, incorrect authentication methods, or disabled TDS endpoints. Nevertheless, most of these issues can be resolved by reviewing the setup steps in Microsoft Docs.

    Get in Touch