You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Learn how to add a service principal to Azure Analysis Services admin role | Microsoft Docs
3
+
description: Learn how to add an automation service principal to the Azure Analysis Services server admin role
4
+
author: kfollis
5
+
ms.service: analysis-services
6
+
ms.topic: conceptual
7
+
ms.date: 01/24/2023
8
+
ms.author: kfollis
9
+
ms.reviewer: minewiskan
10
+
ms.custom: fasttrack-edit
11
+
12
+
---
13
+
14
+
# Add a service principal to the server administrator role
15
+
16
+
To automate unattended PowerShell tasks, a service principal must have **server administrator** privileges on the Analysis Services server being managed. This article describes how to add a service principal to the server administrators role on an Analysis Services server. You can do this using SQL Server Management Studio or a Resource Manager template.
17
+
18
+
> [!NOTE]
19
+
> Service principals must be added directly to the server administrator role. Adding a service principal to a security group, and then adding that security group to the server administrator role is not supported.
20
+
21
+
## Before you begin
22
+
Before completing this task, you must have a service principal registered in Microsoft Entra ID.
23
+
24
+
[Create service principal - Azure portal](../active-directory/develop/howto-create-service-principal-portal.md)
25
+
[Create service principal - PowerShell](../active-directory/develop/howto-authenticate-service-principal-powershell.md)
26
+
27
+
## Using SQL Server Management Studio
28
+
29
+
You can configure server administrators using SQL Server Management Studio (SSMS). To complete this task, you must have [server administrator](analysis-services-server-admins.md) permissions on the Analysis Services server.
30
+
31
+
1. In SSMS, connect to your Analysis Services server.
32
+
2. In **Server Properties** > **Security**, click **Add**.
33
+
3. In **Select a User or Group**, search for your registered app by name, select, and then click **Add**.
34
+
35
+

36
+
37
+
4. Verify the service principal account ID, and then click **OK**.
38
+
39
+

40
+
41
+
## Using a Resource Manager template
42
+
43
+
You can also configure server administrators by deploying the Analysis Services server using an Azure Resource Manager template. The identity running the deployment must belong to the **Contributor** role for the resource in [Azure role-based access control (Azure RBAC)](../role-based-access-control/overview.md).
44
+
45
+
> [!IMPORTANT]
46
+
> The service principal must be added using the format `app:{service-principal-client-id}@{azure-ad-tenant-id}`.
47
+
48
+
The following Resource Manager template deploys an Analysis Services server with a specified service principal added to the Analysis Services Admin role:
Managed identities that are added to database or server roles will be unable to login to the service or do any operations. Managed identities for service principals are not supported in Azure Analysis Services.
99
+
100
+
## Related information
101
+
102
+
*[Download SQL Server PowerShell Module](/sql/ssms/download-sql-server-ps-module)
0 commit comments