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/roles/manage-roles-portal.md
+28-24Lines changed: 28 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,65 +101,69 @@ Follow these steps to assign Azure AD roles using PowerShell.
101
101
1. Open a PowerShell window and use [Import-Module](/powershell/module/microsoft.powershell.core/import-module) to import the AzureADPreview module. For more information, see [Prerequisites to use PowerShell or Graph Explorer](prerequisites.md).
1. In a PowerShell window, use [Connect-AzureAD](/powershell/module/azuread/connect-azuread) to sign in to your tenant.
107
+
1. In a PowerShell window, use [Connect-MgGraph](/powershell/microsoftgraph/authentication-commands?view=graph-powershell-1.0&preserve-view=true) to sign in to your tenant.
1. Use [Get-AzureADUser](/powershell/module/azuread/get-azureaduser) to get the user you want to assign a role to.
113
+
1. Use [Get-MgUser](/powershell/module/microsoft.graph.users/get-mguser?view=graph-powershell-1.0&preserve-view=true) to get the user you want to assign a role to.
1. Use [Get-AzureADMSRoleDefinition](/powershell/module/azuread/get-azureadmsroledefinition) to get the role you want to assign.
121
+
1. Use [Get-MgRoleManagementDirectoryRoleDefinition](/powershell/module/microsoft.graph.identity.governance/get-mgrolemanagementdirectoryroledefinition?view=graph-powershell-1.0&preserve-view=true) to get the role you want to assign.
1. Use [New-AzureADMSRoleAssignment](/powershell/module/azuread/new-azureadmsroleassignment) to assign the role.
127
+
1. Use [New-MgRoleManagementDirectoryRoleAssignment](/powershell/module/microsoft.graph.identity.governance/new-mgrolemanagementdirectoryroleassignment?view=graph-powershell-1.0&preserve-view=true) to assign the role.
If PIM is enabled, you have additional capabilities, such as making a user eligible for a role assignment or defining the start and end time for a role assignment. These capabilities use a different set of PowerShell commands. For more information about using PowerShell and PIM, see [PowerShell for Azure AD roles in Privileged Identity Management](../privileged-identity-management/powershell-for-azure-ad-roles.md).
136
136
137
137
138
-
1. Use [Get-AzureADMSRoleDefinition](/powershell/module/azuread/get-azureadmsroledefinition) to get the role you want to assign.
138
+
1. Use [Get-MgRoleManagementDirectoryRoleDefinition](/powershell/module/microsoft.graph.identity.governance/get-mgrolemanagementdirectoryroledefinition?view=graph-powershell-1.0&preserve-view=true) to get the role you want to assign.
1. Use [Get-AzureADMSPrivilegedResource](/powershell/module/azuread/get-azureadmsprivilegedresource) to get the privileged resource. In this case, your tenant.
144
+
1. Use the following command to create a hash table to store all the necessary attributes required to assign the role to the user. The Principal ID will be the user id to which you want to assign the role. In this example, the assignment will be valid only for **10 hours**.
1. Use [New-Object](/powershell/module/microsoft.powershell.utility/new-object) to create a new `AzureADMSPrivilegedSchedule` object to define the start and end time of the role assignment.
1. Use [Open-AzureADMSPrivilegedRoleAssignmentRequest](/powershell/module/azuread/open-azureadmsprivilegedroleassignmentrequest) to assign the role as eligible.
163
+
1. Use [New-MgRoleManagementDirectoryRoleEligibilityScheduleRequest](/powershell/module/microsoft.graph.identity.governance/new-mgrolemanagementdirectoryroleeligibilityschedulerequest?view=graph-powershell-1.0&preserve-view=true) to assign the role as eligible. Once the role has been assigned, it will reflect on the Azure portal under **Privileged Identity Management -> Azure AD Roles -> Assignments -> Eligible Assignments** section.
| Communication Services |[ACSCallAutomationIncomingOperations](/azure/azure-monitor/reference/tables/ACSCallAutomationIncomingOperations)<br>[ACSCallAutomationMediaSummary](/azure/azure-monitor/reference/tables/ACSCallAutomationMediaSummary)<br>[ACSCallRecordingIncomingOperations](/azure/azure-monitor/reference/tables/ACSCallRecordingIncomingOperations)<br>[ACSCallRecordingSummary](/azure/azure-monitor/reference/tables/ACSCallRecordingSummary)<br>[ACSCallSummary](/azure/azure-monitor/reference/tables/ACSCallSummary)<br>[ACSRoomsIncomingOperations](/azure/azure-monitor/reference/tables/acsroomsincomingoperations)|
193
+
| Communication Services |[ACSCallAutomationIncomingOperations](/azure/azure-monitor/reference/tables/ACSCallAutomationIncomingOperations)<br>[ACSCallAutomationMediaSummary](/azure/azure-monitor/reference/tables/ACSCallAutomationMediaSummary)<br>[ACSCallRecordingIncomingOperations](/azure/azure-monitor/reference/tables/ACSCallRecordingIncomingOperations)<br>[ACSCallRecordingSummary](/azure/azure-monitor/reference/tables/ACSCallRecordingSummary)<br>[ACSCallSummary](/azure/azure-monitor/reference/tables/ACSCallSummary)<br>[ACSJobRouterIncomingOperations](/azure/azure-monitor/reference/tables/ACSJobRouterIncomingOperations)<br>[ACSRoomsIncomingOperations](/azure/azure-monitor/reference/tables/acsroomsincomingoperations)|
| Data Manager for Energy |[OEPDataplaneLogs](/azure/azure-monitor/reference/tables/OEPDataplaneLogs)|
196
196
| Dedicated SQL Pool |[SynapseSqlPoolSqlRequests](/azure/azure-monitor/reference/tables/synapsesqlpoolsqlrequests)<br>[SynapseSqlPoolRequestSteps](/azure/azure-monitor/reference/tables/synapsesqlpoolrequeststeps)<br>[SynapseSqlPoolExecRequests](/azure/azure-monitor/reference/tables/synapsesqlpoolexecrequests)<br>[SynapseSqlPoolDmsWorkers](/azure/azure-monitor/reference/tables/synapsesqlpooldmsworkers)<br>[SynapseSqlPoolWaits](/azure/azure-monitor/reference/tables/synapsesqlpoolwaits)|
Copy file name to clipboardExpand all lines: articles/defender-for-cloud/just-in-time-access-usage.md
+16-12Lines changed: 16 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Learn how just-in-time VM access (JIT) in Microsoft Defender for Cl
4
4
ms.topic: how-to
5
5
author: dcurwin
6
6
ms.author: dacurwin
7
-
ms.date: 06/29/2023
7
+
ms.date: 08/27/2023
8
8
---
9
9
10
10
# Enable just-in-time access on VMs
@@ -13,7 +13,7 @@ You can use Microsoft Defender for Cloud's just-in-time (JIT) access to protect
13
13
14
14
Learn more about [how JIT works](just-in-time-access-overview.md) and the [permissions required to configure and use JIT](#prerequisites).
15
15
16
-
In this article, you learn you how to include JIT in your security program, including how to:
16
+
In this article, you learn how to include JIT in your security program, including how to:
17
17
18
18
- Enable JIT on your VMs from the Azure portal or programmatically
19
19
- Request access to a VM that has JIT enabled from the Azure portal or programmatically
@@ -30,11 +30,11 @@ In this article, you learn you how to include JIT in your security program, incl
30
30
31
31
## Prerequisites
32
32
33
-
- JIT Requires[Microsoft Defender for Servers Plan 2](plan-defender-for-servers-select-plan.md#plan-features) to be enabled on the subscription.
33
+
- JIT requires[Microsoft Defender for Servers Plan 2](plan-defender-for-servers-select-plan.md#plan-features) to be enabled on the subscription.
34
34
35
35
-**Reader** and **SecurityReader** roles can both view the JIT status and parameters.
36
36
37
-
- If you want to create custom roles that can work with JIT, you need the details from the following table:
37
+
- If you want to create custom roles that work with JIT, you need the details from the following table:
38
38
39
39
| To enable a user to: | Permissions to set|
40
40
| --- | --- |
@@ -50,9 +50,13 @@ In this article, you learn you how to include JIT in your security program, incl
50
50
> [!TIP]
51
51
> To create a least-privileged role for users that need to request JIT access to a VM, and perform no other JIT operations, use the [Set-JitLeastPrivilegedRole script](https://github.com/Azure/Azure-Security-Center/tree/main/Powershell%20scripts/JIT%20Scripts/JIT%20Custom%20Role) from the Defender for Cloud GitHub community pages.
52
52
53
+
54
+
> [!NOTE]
55
+
> In order to successfully create a custom JIT policy, the policy name, together with the targeted VM name, must not exceed a total of 56 characters.
56
+
53
57
## Work with JIT VM access using Microsoft Defender for Cloud
54
58
55
-
You can use Defender for Cloud or you can programmatically enable JIT VM access with your own custom options, or you can enable JIT with default, hard-coded parameters from Azure Virtual machines.
59
+
You can use Defender for Cloud or you can programmatically enable JIT VM access with your own custom options, or you can enable JIT with default, hard-coded parameters from Azure virtual machines.
56
60
57
61
**Just-in-time VM access** shows your VMs grouped into:
58
62
@@ -69,13 +73,13 @@ You can use Defender for Cloud or you can programmatically enable JIT VM access
69
73
70
74
### Enable JIT on your VMs from Microsoft Defender for Cloud
71
75
72
-
:::image type="content" source="./media/just-in-time-access-usage/configure-just-in-time-access.gif" alt-text="Screenshot showing configuring JIT VM access in Microsoft Defender for Cloud.":::
76
+
:::image type="content" source="./media/just-in-time-access-usage/configure-just-in-time-access.gif" alt-text="Screenshot showing configuring JIT VM access in Microsoft Defender for Cloud." lightbox="media/just-in-time-access-usage/configure-just-in-time-access.gif":::
73
77
74
78
From Defender for Cloud, you can enable and configure the JIT VM access.
75
79
76
80
1. Open the **Workload protections** and, in the advanced protections, select **Just-in-time VM access**.
77
81
78
-
1. In the **Not configured** virtual machines, mark the VMs to protect with JIT and select **Enable JIT on VMs**.
82
+
1. In the **Not configured** virtual machines tab, mark the VMs to protect with JIT and select **Enable JIT on VMs**.
79
83
80
84
The JIT VM access page opens listing the ports that Defender for Cloud recommends protecting:
81
85
- 22 - SSH
@@ -102,7 +106,7 @@ To edit the existing JIT rules for a VM:
102
106
103
107
1. Open the **Workload protections** and, in the advanced protections, select **Just-in-time VM access**.
104
108
105
-
1. In the **Configured** virtual machines, right-click on a VM and select edit.
109
+
1. In the **Configured** virtual machines tab, right-click on a VM and select **Edit**.
106
110
107
111
1. In the **JIT VM access configuration**, you can either edit the list of port or select **Add** a new custom port.
108
112
@@ -114,7 +118,7 @@ When a VM has a JIT enabled, you have to request access to connect to it. You ca
114
118
115
119
1. From the **Just-in-time VM access** page, select the **Configured** tab.
116
120
117
-
1. Select the VMs you want to access.
121
+
1. Select the VMs you want to access:
118
122
119
123
- The icon in the **Connection Details** column indicates whether JIT is enabled on the network security group or firewall. If it's enabled on both, only the firewall icon appears.
120
124
@@ -126,8 +130,8 @@ When a VM has a JIT enabled, you have to request access to connect to it. You ca
126
130
127
131
1. Select **Open ports**.
128
132
129
-
> [!NOTE]
130
-
> If a user who is requesting access is behind a proxy, you can enter the IP address range of the proxy.
133
+
> [!NOTE]
134
+
> If a user who is requesting access is behind a proxy, you can enter the IP address range of the proxy.
131
135
132
136
## Other ways to work with JIT VM access
133
137
@@ -163,7 +167,7 @@ You can enable JIT on a VM from the Azure virtual machines pages of the Azure po
163
167
164
168
1. From Defender for Cloud's menu, select **Just-in-time VM access**.
165
169
166
-
1. From the **Configured** tab, right-click on the VM to which you want to add a port, and select edit.
170
+
1. From the **Configured** tab, right-click on the VM to which you want to add a port, and select **Edit**.
167
171
168
172

0 commit comments