Azure Analysis Services Documentation

Connect to Azure Analysis Services with Visual Studio

Connecting to Azure Analysis Services with Visual Studio

This guide explains how to connect to your Azure Analysis Services (AAS) tabular or multidimensional models using SQL Server Data Tools (SSDT) in Visual Studio. This connection allows you to develop, manage, and deploy your models directly.

Prerequisites

  • An existing Azure Analysis Services server.
  • Visual Studio 2019 or later installed.
  • SQL Server Data Tools (SSDT) for Visual Studio. If not installed, download and install it from the Visual Studio Marketplace.
  • Permissions to access your Azure Analysis Services server (e.g., Administrator or Model Designer role).

Steps to Connect

1. Open or Create a Project in Visual Studio

Launch Visual Studio. You can either open an existing Analysis Services project or create a new one:

  • To create a new project: Go to File > New > Project. Search for "Analysis Services". Select the appropriate template (e.g., "Analysis Services Tabular Project" or "Analysis Services Multidimensional Project") and follow the prompts.
  • To open an existing project: Go to File > Open > Project/Solution and select your project file.

2. Connect to the Azure Analysis Services Server

Within your Analysis Services project, you'll need to establish a connection to your AAS server. The exact method depends on whether you are creating a new model or connecting to an existing one.

For New Tabular Models:

When you create a new Tabular project, you will be prompted to select a Data Source.

  1. In the "New Project" dialog, select "Analysis Services Tabular Project".
  2. In the "Tabular Model Designer" dialog that appears, choose "Import from Azure Analysis Services".
  3. In the "Select Server" dialog, enter the Server Name of your Azure Analysis Services instance. You can find this in the Azure portal.
  4. Click Connect.
  5. If prompted for credentials, sign in using your Azure AD account that has the necessary permissions.
  6. Once connected, you can select an existing database (model) from the server or create a new empty model.
For New Multidimensional Models:

Similar to tabular, when creating a new Multidimensional project, you'll be prompted for a data source.

  1. In the "New Project" dialog, select "Analysis Services Multidimensional Project".
  2. In the "Solution Explorer", right-click on the "Data Sources" folder and select "New Data Source...".
  3. In the "Data Source Wizard", click "New...".
  4. In the "Connection Manager" dialog, set the "Data source type" to "Microsoft Azure Analysis Services".
  5. Enter your Server Name.
  6. Click Connect.
  7. Sign in with your Azure AD credentials if prompted.
  8. Select the database you want to connect to.
  9. Complete the wizard.
Connecting to an Existing Project or Model

If you already have a project and need to change or add a connection:

  1. In Solution Explorer, right-click on the "Data Sources" folder and select "New Data Source...".
  2. Follow the steps for creating a new multidimensional model (as described above), ensuring you select "Microsoft Azure Analysis Services" as the data source type.
  3. If you need to update an existing data source, right-click the data source in Solution Explorer and select "Edit".

3. Authentication

When connecting to Azure Analysis Services, authentication is typically handled via Azure Active Directory (Azure AD). You will be prompted to sign in with your Azure AD credentials. Ensure the account you use has appropriate permissions on the AAS server (e.g., Administrator or Model Designer).

Visual Studio Azure Analysis Services Server Name

Figure 1: Entering the Azure Analysis Services server name in Visual Studio.

Troubleshooting Connection Issues

  • Incorrect Server Name: Double-check the server name you entered. It should match the name shown in the Azure portal.
  • Permissions: Verify that your Azure AD account has the necessary roles assigned on the AAS server.
  • Firewall: Ensure that any network security groups or firewalls are configured to allow connections to your AAS instance on port 443.
  • SSDT Version: Make sure you have a compatible version of SSDT installed for your version of Visual Studio.

Once successfully connected, you can start building or modifying your tabular or multidimensional models, defining tables, relationships, measures, and more.