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
Copy file name to clipboardExpand all lines: articles/active-directory/managed-identities-azure-resources/how-to-assign-app-role-managed-identity-powershell.md
Managed identities for Azure resources provide Azure services with an identity in Azure Active Directory. They work without needing credentials in your code. Azure services use this identity to authenticate to services that support Azure AD authentication. Application roles provide a form of role-based access control, and allow a service to implement authorization rules.
24
24
25
25
> [!NOTE]
26
-
> The tokens which your application receives are cached by the underlying infrastructure, which means that any changes to the managed identity's roles can take significant time to take effect. For more information, see [Limitation of using managed identities for authorization](managed-identity-best-practice-recommendations.md#limitation-of-using-managed-identities-for-authorization).
26
+
> The tokens that your application receives are cached by the underlying infrastructure, which means that any changes to the managed identity's roles can take significant time to take effect. For more information, see [Limitation of using managed identities for authorization](managed-identity-best-practice-recommendations.md#limitation-of-using-managed-identities-for-authorization).
27
27
28
28
In this article, you learn how to assign a managed identity to an application role exposed by another application using Azure AD PowerShell.
29
29
@@ -33,40 +33,50 @@ In this article, you learn how to assign a managed identity to an application ro
33
33
- If you don't already have an Azure account, [sign up for a free account](https://azure.microsoft.com/free/) before continuing.
34
34
- To run the example scripts, you have two options:
35
35
- Use the [Azure Cloud Shell](../../cloud-shell/overview.md), which you can open using the **Try It** button on the top-right corner of code blocks.
36
-
- Run scripts locally by installing the latest version of [the Az PowerShell module](/powershell/azure/install-az-ps) and the [Microsoft Graph PowerShell SDK](/powershell/microsoftgraph/get-started).
36
+
- Run scripts locally by installing the latest version of [the Az PowerShell module](/powershell/azure/install-az-ps). You can also use the [Microsoft Graph PowerShell SDK](/powershell/microsoftgraph/get-started).
37
37
38
38
## Assign a managed identity access to another application's app role
39
39
40
40
1. Enable managed identity on an Azure resource, [such as an Azure VM](qs-configure-powershell-windows-vm.md).
41
41
42
42
1. Find the object ID of the managed identity's service principal.
43
43
44
-
**For a system-assigned managed identity**, you can find the object ID on the Azure portal on the resource's **Identity** page. You can also use the following PowerShell script to find the object ID. You'll need the resource ID of the resource you created in step 1, which is available in the Azure portal on the resource's **Properties** page.
44
+
**For a system-assigned managed identity**, you can find the object ID on the Azure portal on the resource's **Identity** page. You can also use the following PowerShell script to find the object ID. You'll need the resource ID of the resource you created in step 1, which is available in the Azure portal on the resource's **Properties** page.
**For a user-assigned managed identity**, you can find the managed identity's object ID on the Azure portal on the resource's **Overview** page. You can also use the following PowerShell script to find the object ID. You'll need the resource ID of the user-assigned managed identity.
51
+
**For a user-assigned managed identity**, you can find the managed identity's object ID on the Azure portal on the resource's **Overview** page. You can also use the following PowerShell script to find the object ID. You'll need the resource ID of the user-assigned managed identity.
1. Create a new application registration to represent the service that your managed identity will send a request to. If the API or service that exposes the app role grant to the managed identity already has a service principal in your Azure AD tenant, skip this step. For example, if you want to grant the managed identity access to the Microsoft Graph API, you can skip this step.
59
59
60
60
1. Find the object ID of the service application's service principal. You can find this using the Azure portal. Go to Azure Active Directory and open the **Enterprise applications** page, then find the application and look for the **Object ID**. You can also find the service principal's object ID by its display name using the following PowerShell script:
> Display names for applications are not unique, so you should verify that you obtain the correct application's service principal.
68
78
69
-
1. Add an [app role](../develop/howto-add-app-roles-in-azure-ad-apps.md) to the application you created in step 3. You can create the role using the Azure portal or using Microsoft Graph. For example, you could add an app role like this:
79
+
1. Add an [app role](../develop/howto-add-app-roles-in-azure-ad-apps.md) to the application you created in step 3. You can create the role using the Azure portal or by using Microsoft Graph. For example, you could add an app role like this:
70
80
71
81
```json
72
82
{
@@ -88,6 +98,18 @@ In this article, you learn how to assign a managed identity to an application ro
88
98
89
99
Execute the following PowerShell command to add the role assignment:
90
100
101
+
# [Azure PowerShell](#tab/azurepowershell)
102
+
103
+
```powershell
104
+
New-AzureADServiceAppRoleAssignment `
105
+
-ObjectId $managedIdentityObjectId `
106
+
-Id $appRoleId `
107
+
-PrincipalId $managedIdentityObjectId `
108
+
-ResourceId $serverServicePrincipalObjectId
109
+
```
110
+
111
+
# [Microsoft Graph](#tab/microsoftgraph)
112
+
91
113
```powershell
92
114
New-MgServicePrincipalAppRoleAssignment `
93
115
-ServicePrincipalId $managedIdentityObjectId `
@@ -96,10 +118,51 @@ In this article, you learn how to assign a managed identity to an application ro
96
118
-AppRoleId $appRoleId
97
119
```
98
120
121
+
---
122
+
99
123
## Complete script
100
124
101
125
This example script shows how to assign an Azure web app's managed identity to an app role.
102
126
127
+
# [Azure PowerShell](#tab/azurepowershell)
128
+
129
+
```powershell
130
+
# Install the module. This step requires you to be an administrator on your machine.
131
+
# Install-Module AzureAD
132
+
133
+
# Your tenant ID (in the Azure portal, under Azure Active Directory > Overview).
134
+
$tenantID = '<tenant-id>'
135
+
136
+
# The name of your web app, which has a managed identity that should be assigned to the server app's app role.
Copy file name to clipboardExpand all lines: articles/azure-monitor/insights/solutions.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -239,6 +239,8 @@ To verify the link between a Log Analytics workspace and an Automation account:
239
239
240
240
## Remove a monitoring solution
241
241
242
+
You can remove any installed monitoring solution, except **LogManagment**, which is a built-in solution that contains the schemas that aren't associated to a specific solution.
243
+
242
244
### [Portal](#tab/portal)
243
245
244
246
To remove an installed solution by using the portal, find it in the [list of installed solutions](#list-installed-monitoring-solutions). Select the name of the solution to open its summary page, and then select **Delete**.
@@ -270,4 +272,4 @@ Remove-AzMonitorLogAnalyticsSolution -ResourceGroupName MyResourceGroup -Name W
270
272
271
273
* Get a [list of monitoring solutions from Microsoft](../monitor-reference.md).
272
274
* Learn how to [create queries](../logs/log-query-overview.md) to analyze data that monitoring solutions have collected.
273
-
* See all [Azure CLI commands for Azure Monitor](/cli/azure/azure-cli-reference-for-monitor).
275
+
* See all [Azure CLI commands for Azure Monitor](/cli/azure/azure-cli-reference-for-monitor).
Copy file name to clipboardExpand all lines: articles/azure-monitor/logs/customer-managed-keys.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -411,6 +411,8 @@ Deleting a linked workspace is permitted while linked to cluster. If you decide
411
411
412
412
- You can't use Customer-managed key with User-assigned managed identity if your Key Vault is in Private-Link (vNet). You can use System-assigned managed identity in this scenario.
413
413
414
+
-[Search jobs asynchronous queries](./search-jobs.md) aren't supported in Customer-managed key scenario currently.
Copy file name to clipboardExpand all lines: articles/backup/backup-rbac-rs-vault.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ The following table captures the Backup management actions and corresponding min
40
40
|| Virtual Machine Contributor | VM resource | Alternatively, instead of a built-in-role, you can consider a custom role which has the following permissions: Microsoft.Compute/virtualMachines/write Microsoft.Compute/virtualMachines/read Microsoft.Compute/virtualMachines/instanceView/read |
41
41
| On-demand backup of VM | Backup Operator | Recovery Services vault ||
|| Contributor | Resource group in which VM will be deployed | Alternatively, instead of a built-in-role, you can consider a custom role which has the following permissions: Microsoft.Resources/subscriptions/resourceGroups/write Microsoft.DomainRegistration/domains/write, Microsoft.Compute/virtualMachines/write Microsoft.Compute/virtualMachines/read Microsoft.Network/virtualNetworks/read Microsoft.Network/virtualNetworks/subnets/read Microsoft.Network/virtualNetworks/subnets/join/action |
43
+
|| Contributor | Resource group in which VM will be deployed | Alternatively, instead of a built-in-role, you can consider a custom role which has the following permissions: Microsoft.Resources/subscriptions/resourceGroups/write Microsoft.DomainRegistration/domains/write (required only for classic VM restore and not required for managed VMs), Microsoft.Compute/virtualMachines/write Microsoft.Compute/virtualMachines/read Microsoft.Network/virtualNetworks/read Microsoft.Network/virtualNetworks/subnets/read Microsoft.Network/virtualNetworks/subnets/join/action |
44
44
|| Virtual Machine Contributor | Source VM that got backed up | Alternatively, instead of a built-in-role, you can consider a custom role which has the following permissions: Microsoft.Compute/virtualMachines/write Microsoft.Compute/virtualMachines/read|
|| Virtual Machine Contributor | Source VM that got backed up | Alternatively, instead of a built-in-role, you can consider a custom role which has the following permissions: Microsoft.Compute/virtualMachines/write Microsoft.Compute/virtualMachines/read |
@@ -153,4 +153,4 @@ The following table captures the Backup management actions and corresponding Azu
Copy file name to clipboardExpand all lines: articles/backup/tutorial-sap-hana-backup-cli.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,11 @@
2
2
title: Tutorial - SAP HANA DB backup on Azure using Azure CLI
3
3
description: In this tutorial, learn how to back up SAP HANA databases running on an Azure VM to an Azure Backup Recovery Services vault using Azure CLI.
4
4
ms.topic: tutorial
5
-
ms.date: 12/4/2019
5
+
ms.date: 07/05/2022
6
6
ms.custom: devx-track-azurecli
7
+
author: v-amallick
8
+
ms.service: backup
9
+
ms.author: v-amallick
7
10
---
8
11
9
12
# Tutorial: Back up SAP HANA databases in an Azure VM using Azure CLI
To get container name, run the following command. [Learn about this CLI command](/cli/azure/backup/container?view=azure-cli-latest#az-backup-container-list).
152
+
153
+
```azurecli
154
+
az backup item list --resource-group <resource group name> --vault-name <vault name>
155
+
156
+
```
157
+
146
158
## Trigger an on-demand backup
147
159
148
160
While the section above details how to configure a scheduled backup, this section talks about triggering an on-demand backup. To do this, we use the [az backup protection backup-now](/cli/azure/backup/protection#az-backup-protection-backup-now) cmdlet.
You can copy data from Azure Cosmos DB's API for MongoDB to any supported sink data store, or copy data from any supported source data store to Azure Cosmos DB's API for MongoDB. For a list of data stores that Copy Activity supports as sources and sinks, see [Supported data stores and formats](copy-activity-overview.md#supported-data-stores-and-formats).
26
34
27
35
You can use the Azure Cosmos DB's API for MongoDB connector to:
0 commit comments