Skip to content

Commit cae4163

Browse files
committed
update
1 parent 63affd3 commit cae4163

12 files changed

+224
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
author: msmbaldwin
3+
ms.service: key-vault
4+
ms.topic: include
5+
ms.date: 04/04/2024
6+
ms.author: msmbaldwin
7+
8+
# Used by articles that show how to assign a Key Vault access policy
9+
10+
---
11+
12+
To grant your application permissions to your key vault through [Role-Based Access Control (RBAC)](/azure/key-vault/general/rbac-guide.md), assign a role using the Azure CLI command [az role assignment create](/cli/azure/role/assignment#az-role-assignment-create).
13+
14+
```azurecli
15+
az role assignment create --role "Key Vault Crypto Officer" --assignee "<app-id>" --scope "/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.KeyVault/vaults/<your-unique-keyvault-name>"
16+
```
17+
18+
Replace \<app-id\>, \<subscription-id\>, \<resource-group-name\> and \<your-unique-keyvault-name\> with your actual values. \<app-id\> is the Application (client) ID of your registered application in Azure AD.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
author: msmbaldwin
3+
ms.service: key-vault
4+
ms.topic: include
5+
ms.date: 04/04/2024
6+
ms.author: msmbaldwin
7+
8+
# Used by articles that show how to assign a Key Vault access policy
9+
10+
---
11+
12+
### [Azure CLI](#tab/azure-cli)
13+
14+
[!INCLUDE [Using RBAC to provide access to a key vault - CLI](./crypto-officer-cli.md)]
15+
16+
### [Azure PowerShell](#tab/azure-powershell)
17+
18+
[!INCLUDE [Using RBAC to provide access to a key vault - PowerShell](./crypto-officer-powershell.md)]
19+
20+
---
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
author: msmbaldwin
3+
ms.service: key-vault
4+
ms.topic: include
5+
ms.date: 04/04/2024
6+
ms.author: msmbaldwin
7+
8+
# Used by articles that show how to assign a Key Vault access policy
9+
10+
---
11+
12+
To grant your application permissions to your key vault through [Role-Based Access Control (RBAC)](/azure/key-vault/general/rbac-guide.md), assign a role using the Azure PowerShell cmdlet [New-AzRoleAssignment](/powershell/module/az.resources/new-azroleassignment).
13+
14+
```azurepowershell
15+
New-AzRoleAssignment -ObjectId "<app-id>" -RoleDefinitionName "Key Vault Crypto Officer" -Scope "/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.KeyVault/vaults/<your-unique-keyvault-name>"
16+
```
17+
18+
Replace \<app-id\>, \<subscription-id\>, \<resource-group-name\> and \<your-unique-keyvault-name\> with your actual values. \<app-id\> is the Application (client) ID of your registered application in Azure AD.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
author: msmbaldwin
3+
ms.service: key-vault
4+
ms.topic: include
5+
ms.date: 04/04/2024
6+
ms.author: msmbaldwin
7+
8+
# Used by articles that show how to assign a Key Vault access policy
9+
10+
---
11+
12+
To grant your application permissions to your key vault through [Role-Based Access Control (RBAC)](/azure/key-vault/general/rbac-guide.md), assign a role using the Azure CLI command [az role assignment create](/cli/azure/role/assignment#az-role-assignment-create).
13+
14+
```azurecli
15+
az role assignment create --role "Key Vault Crypto User" --assignee "<app-id>" --scope "/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.KeyVault/vaults/<your-unique-keyvault-name>"
16+
```
17+
18+
Replace \<app-id\>, \<subscription-id\>, \<resource-group-name\> and \<your-unique-keyvault-name\> with your actual values. \<app-id\> is the Application (client) ID of your registered application in Azure AD.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
author: msmbaldwin
3+
ms.service: key-vault
4+
ms.topic: include
5+
ms.date: 04/04/2024
6+
ms.author: msmbaldwin
7+
8+
# Used by articles that show how to assign a Key Vault access policy
9+
10+
---
11+
12+
### [Azure CLI](#tab/azure-cli)
13+
14+
[!INCLUDE [Using RBAC to provide access to a key vault - CLI](./key-vault-quickstart-rbac-cli.md)]
15+
16+
### [Azure PowerShell](#tab/azure-powershell)
17+
18+
[!INCLUDE [Using RBAC to provide access to a key vault - PowerShell](./key-vault-quickstart-rbac-powershell.md)]
19+
20+
---
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
author: msmbaldwin
3+
ms.service: key-vault
4+
ms.topic: include
5+
ms.date: 04/04/2024
6+
ms.author: msmbaldwin
7+
8+
# Used by articles that show how to assign a Key Vault access policy
9+
10+
---
11+
12+
To grant your application permissions to your key vault through [Role-Based Access Control (RBAC)](/azure/key-vault/general/rbac-guide.md), assign a role using the Azure PowerShell cmdlet [New-AzRoleAssignment](/powershell/module/az.resources/new-azroleassignment).
13+
14+
```azurepowershell
15+
New-AzRoleAssignment -ObjectId "<app-id>" -RoleDefinitionName "Key Vault Crypto User" -Scope "/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.KeyVault/vaults/<your-unique-keyvault-name>"
16+
```
17+
18+
Replace \<app-id\>, \<subscription-id\>, \<resource-group-name\> and \<your-unique-keyvault-name\> with your actual values. \<app-id\> is the Application (client) ID of your registered application in Azure AD.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
author: msmbaldwin
3+
ms.service: key-vault
4+
ms.topic: include
5+
ms.date: 04/04/2024
6+
ms.author: msmbaldwin
7+
8+
# Used by articles that show how to assign a Key Vault access policy
9+
10+
---
11+
12+
To grant your application permissions to your key vault through [Role-Based Access Control (RBAC)](/azure/key-vault/general/rbac-guide.md), assign a role using the Azure CLI command [az role assignment create](/cli/azure/role/assignment#az-role-assignment-create).
13+
14+
```azurecli
15+
az role assignment create --role "Key Vault Secrets Officer" --assignee "<app-id>" --scope "/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.KeyVault/vaults/<your-unique-keyvault-name>"
16+
```
17+
18+
Replace \<app-id\>, \<subscription-id\>, \<resource-group-name\> and \<your-unique-keyvault-name\> with your actual values. \<app-id\> is the Application (client) ID of your registered application in Azure AD.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
author: msmbaldwin
3+
ms.service: key-vault
4+
ms.topic: include
5+
ms.date: 04/04/2024
6+
ms.author: msmbaldwin
7+
8+
# Used by articles that show how to assign a Key Vault access policy
9+
10+
---
11+
12+
### [Azure CLI](#tab/azure-cli)
13+
14+
[!INCLUDE [Using RBAC to provide access to a key vault - CLI](./key-vault-quickstart-rbac-cli.md)]
15+
16+
### [Azure PowerShell](#tab/azure-powershell)
17+
18+
[!INCLUDE [Using RBAC to provide access to a key vault - PowerShell](./key-vault-quickstart-rbac-powershell.md)]
19+
20+
---
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
author: msmbaldwin
3+
ms.service: key-vault
4+
ms.topic: include
5+
ms.date: 04/04/2024
6+
ms.author: msmbaldwin
7+
8+
# Used by articles that show how to assign a Key Vault access policy
9+
10+
---
11+
12+
To grant your application permissions to your key vault through [Role-Based Access Control (RBAC)](/azure/key-vault/general/rbac-guide.md), assign a role using the Azure PowerShell cmdlet [New-AzRoleAssignment](/powershell/module/az.resources/new-azroleassignment).
13+
14+
```azurepowershell
15+
New-AzRoleAssignment -ObjectId "<app-id>" -RoleDefinitionName "Key Vault Secrets Officer" -Scope "/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.KeyVault/vaults/<your-unique-keyvault-name>"
16+
```
17+
18+
Replace \<app-id\>, \<subscription-id\>, \<resource-group-name\> and \<your-unique-keyvault-name\> with your actual values. \<app-id\> is the Application (client) ID of your registered application in Azure AD.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
author: msmbaldwin
3+
ms.service: key-vault
4+
ms.topic: include
5+
ms.date: 04/04/2024
6+
ms.author: msmbaldwin
7+
8+
# Used by articles that show how to assign a Key Vault access policy
9+
10+
---
11+
12+
To grant your application permissions to your key vault through [Role-Based Access Control (RBAC)](/azure/key-vault/general/rbac-guide.md), assign a role using the Azure CLI command [az role assignment create](/cli/azure/role/assignment#az-role-assignment-create).
13+
14+
```azurecli
15+
az role assignment create --role "Key Vault Secrets User" --assignee "<app-id>" --scope "/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.KeyVault/vaults/<your-unique-keyvault-name>"
16+
```
17+
18+
Replace \<app-id\>, \<subscription-id\>, \<resource-group-name\> and \<your-unique-keyvault-name\> with your actual values. \<app-id\> is the Application (client) ID of your registered application in Azure AD.

0 commit comments

Comments
 (0)