Connect to Azure Analysis Services server

This article guides you through the various methods and tools to connect to your Azure Analysis Services server. Understanding how to connect is crucial for administration, development, and querying your Analysis Services models.

Connection Methods

You can connect to your Azure Analysis Services server using several different tools and programming interfaces. The method you choose often depends on your role and the task you need to perform.

1. SQL Server Management Studio (SSMS)

SSMS is a comprehensive management tool for SQL Server and Azure Analysis Services. It's ideal for administrative tasks, querying using DAX, and deploying models.

  1. Open SQL Server Management Studio.
  2. In the Connect to Server dialog box, in the Server type list, select Analysis Services.
  3. In the Server name box, enter the server name. The server name is typically in the format asazure://[region]/[servername]. For example: asazure://westus/myAnalysisServices.
  4. In the Authentication list, select the appropriate authentication type:
    • Windows Authentication: If your Azure AD account is part of the server's administrator role and you are using Windows Authentication.
    • Azure Active Directory - Universal with MFA: Recommended for interactive sign-in with multi-factor authentication.
    • Azure Active Directory - Password: For signing in with your Azure AD username and password.
    • Azure Active Directory - Integrated: For signing in with your Azure AD credentials if you are on a domain-joined machine.
  5. Click Connect.

2. Visual Studio with Analysis Services Projects

Visual Studio is used for developing Analysis Services models. You can connect to your Azure Analysis Services server to deploy, manage, and test your models directly.

  1. Open your Analysis Services project in Visual Studio.
  2. In the Solution Explorer, right-click on the project name and select Deploy or Build.
  3. When prompted for a server name, enter your Azure Analysis Services server name in the format asazure://[region]/[servername].
  4. Visual Studio will prompt you to sign in using your Azure AD credentials.

3. Power BI Desktop

Power BI Desktop allows users to connect to Azure Analysis Services to create reports and dashboards. This is a common scenario for business analysts and report developers.

  1. Open Power BI Desktop.
  2. On the Home tab, click Get Data.
  3. Select Azure Analysis Services database from the list.
  4. Enter your Server name (e.g., asazure://westus/myAnalysisServices).
  5. Choose a Data Connectivity mode (Import or Live Connection). Live Connection is typically preferred for Azure Analysis Services.
  6. Click OK.
  7. You will be prompted to sign in using your Azure AD credentials.

4. Programmatic Connections (AMO, TOM, ADOMD.NET)

For developers building custom applications or automation scripts, you can use the following libraries:

  • Analysis Management Objects (AMO): For administrative tasks.
  • Tabular Object Model (TOM): A higher-level object model for managing tabular models.
  • ADOMD.NET: For querying and retrieving data.

The connection string format for programmatic access is similar to the SSMS format:

Server=asazure://[region]/[servername];Database=[database_name];User ID=[your_azure_ad_username];Password=[your_azure_ad_password];;Encrypt=True;TrustServerCertificate=False;Connection Timeout=60;

Note on Server Name Format

The server name for Azure Analysis Services always starts with asazure:// followed by the Azure region and the server name.

Permissions and Authentication

To connect successfully, your Azure Active Directory account must have appropriate permissions on the Azure Analysis Services server. Typically, this means being a member of the Administrator role or a custom role with specific permissions.

Tip for Troubleshooting Connection Issues

If you encounter connection errors, verify your server name, ensure your Azure AD account has the necessary permissions, and check your network connectivity.

Next Steps

Once connected, you can begin administering your server, deploying models, or querying data. Explore the following sections for more details: