Skip to content

Commit 1f09ddf

Browse files
authored
Merge pull request #102722 from johndowns/patch-9
Include information about using ARM templates to add administrator role
2 parents f0d1976 + 869208b commit 1f09ddf

File tree

1 file changed

+61
-7
lines changed

1 file changed

+61
-7
lines changed

articles/analysis-services/analysis-services-addservprinc-admins.md

Lines changed: 61 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,26 @@ ms.topic: conceptual
77
ms.date: 10/29/2019
88
ms.author: owend
99
ms.reviewer: minewiskan
10+
ms.custom: fasttrack-edit
1011

1112
---
1213

1314
# Add a service principal to the server administrator role
1415

15-
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 Azure AS server.
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 Azure AS server. You can do this using SQL Server Management Studio or a Resource Manager template.
17+
18+
> [!NOTE]
19+
> For server operations using Azure PowerShell cmdlets, the service principal must also belong to the **Owner** role for the resource in [Azure Role-Based Access Control (RBAC)](../role-based-access-control/overview.md).
1620
1721
## Before you begin
1822
Before completing this task, you must have a service principal registered in Azure Active Directory.
1923

2024
[Create service principal - Azure portal](../active-directory/develop/howto-create-service-principal-portal.md)
2125
[Create service principal - PowerShell](../active-directory/develop/howto-authenticate-service-principal-powershell.md)
2226

23-
## Required permissions
24-
To complete this task, you must have [server administrator](analysis-services-server-admins.md) permissions on the Azure AS server.
27+
## Using SQL Server Management Studio
2528

26-
## Add service principal to server administrators role
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 Azure AS server.
2730

2831
1. In SSMS, connect to your Azure AS server.
2932
2. In **Server Properties** > **Security**, click **Add**.
@@ -35,9 +38,60 @@ To complete this task, you must have [server administrator](analysis-services-se
3538

3639
![Search for service principal account](./media/analysis-services-addservprinc-admins/aas-add-sp-ssms-add.png)
3740

38-
39-
> [!NOTE]
40-
> For server operations using Azure PowerShell cmdlets, service principal running scheduler must also belong to the **Owner** role for the resource in [Azure Role-Based Access Control (RBAC)](../role-based-access-control/overview.md).
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 (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:
49+
50+
```json
51+
{
52+
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
53+
"contentVersion": "1.0.0.0",
54+
"parameters": {
55+
"analysisServicesServerName": {
56+
"type": "string"
57+
},
58+
"location": {
59+
"type": "string"
60+
},
61+
"analysisServicesSkuName": {
62+
"type": "string"
63+
},
64+
"analysisServicesCapacity": {
65+
"type": "int"
66+
},
67+
"servicePrincipalClientId": {
68+
"type": "string"
69+
},
70+
"servicePrincipalTenantId": {
71+
"type": "string"
72+
}
73+
},
74+
"resources": [
75+
{
76+
"name": "[parameters('analysisServicesServerName')]",
77+
"type": "Microsoft.AnalysisServices/servers",
78+
"apiVersion": "2017-08-01",
79+
"location": "[parameters('location')]",
80+
"sku": {
81+
"name": "[parameters('analysisServicesSkuName')]",
82+
"capacity": "[parameters('analysisServicesCapacity')]"
83+
},
84+
"properties": {
85+
"asAdministrators": {
86+
"members": [
87+
"[concat('app:', parameters('servicePrincipalClientId'), '@', parameters('servicePrincipalTenantId'))]"
88+
]
89+
}
90+
}
91+
}
92+
]
93+
}
94+
```
4195

4296
## Related information
4397

0 commit comments

Comments
 (0)