October 3, 2025
Overview
Azure Data Studio is a cross-platform database tool designed for use with both on-premises and cloud data platforms on Windows, macOS, and Linux. It provides an editor that supports IntelliSense, code snippets, source control integration, and an integrated terminal.
The platform includes features such as charting of query result sets and configurable dashboards. Azure Data Studio can be used to query, design, and manage databases and data warehouses locally or in the cloud.
Requirements
- Access to the Enclave Platform is typically provided along with workspace provisioning. Individuals without access may complete and submit the Access Request Form.
- Enclave resources are only available when logged into the Enclave Linux VDI; external access is not enabled.
Instructions for Connection
Step 1 Run Azure Data Studio
-
To launch Azure Data Studio, either execute the `azuredatastudio` command in Bash or select the Azure Data Studio icon from your applications menu.
Step 2. Click on "Create a Connection" Dialog
-
Select the "Create a Connection" dialog to establish a connection with the database.
2. A Connection Dialog will appear, prompting you to enter the required connection details. Please note that users operating Azure Data Studio version 1.48.1 or later will observe changes in how Connection Details are displayed. These updates correspond with Microsoft’s transition from Azure AD to Microsoft Entra ID (https://learn.microsoft.com/en-us/entra/fundamentals/how-to-rename-azure-ad).
Connection Details in Azure Data Studio, version 1.40.1
Connection Details in Azure Data Studio, version 1.48.1 or newer
Note that Authentication Type and Encryption fields differ between versions 1.40.1 and 1.48.1, as highlighted in red below.
Complete PDSR Curated Data Set - Monthly update
You can use Azure Data Studio and configure the connection settings as below to connect to PDSR Database in Azure.
Connection Details
Connection Type: Microsoft SQL Server
Server: mgb-risc-lds-prod-e2-sqlmi.bce5b1eaf95b.database.windows.net
Authentication Type: Azure Active Directory - Universal MFA Support (version 1.40.1)
==> Authentication Type: Microsoft Entra ID - Universal with MFA Support (version 1.48.1).
Account: <Enter Your MGB-Affiliated Email Address> For example: partners.org, mgb.org, mgh.harvard.edu, bwh.harvard.edu, meei.harvard.edu, mclean.harvard.edu etc.
Database: PDSR_Monthly
Encrypt: True (version 1.40.1)
=> Encrypt: Mandatory (version 1.48.1).
Trust server certificate: True
Server Group: <default>
Name (Optional): Complete PDSR Curated Data Set (Monthly)
After entering the connection details, select the 'Connect' button to initiate a connection to the PDSR database.
A browser dialog will appear, prompting you to choose an account for Azure authentication.
Please select the account associated with your MGB email address.
After selecting your account, you’ll be directed to your Mass General Brigham (MGB) sign-in page.
Enter your Mass General Brigham credentials and click Sign In.
The system will sign into the chosen Azure Database. After establishing a successful database connection, the accessible tables within the PDSR Curated Data Set are displayed.
Once you have reviewed the database tables to which you have access rights, you may proceed to execute SQL queries, as demonstrated in the example below.
Tip for Troubleshooting a Common Connection Issue
You may receive an error while trying to connect to the PDSR database with Azure Data Studio as shown the screen capture below:
The error message “User account ‘@email’ not found in MSAL cache…” indicates that Azure Data Studio (ADS) cannot locate a valid Microsoft authentication token for this user in its local cache. This issue may arise due to several reasons:
- The user has not signed in to Azure within ADS.
- The authentication token has expired or been invalidated.
- The account was removed or never properly linked.
- ADS is using cached credentials that do not correspond to the current login state.
Below is a verified solution to resolve this problem:
How to Resolve the Issue
Option 1: Refresh the Token Cache
- Launch Azure Data Studio.
- Press `Ctrl+Shift+P` (or `Cmd+Shift+P` on macOS) to open the Command Palette.
- Type and select “Azure Accounts: Clear Azure Accounts Token Cache.”
- Restart Azure Data Studio.
- Attempt to reconnect to the database; ADS should prompt for re-authentication.
Option 2: Re-authenticate the Account
- Navigate to the Accounts pane in ADS (typically located on the left sidebar).
- Remove the existing account if present.
- Click “Add an Account” and sign in with the account ‘@email’.
- Verify that the correct Azure tenant and subscription are selected.
- Retry connecting to the database.
These steps provide a clear approach for addressing the authentication token issue in Azure Data Studio.