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/develop/scenario-web-app-sign-user-app-configuration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -222,7 +222,7 @@ The initialization code is different depending on the platform. For ASP.NET Core
222
222
223
223
# [ASP.NET Core](#tab/aspnetcore)
224
224
225
-
In ASP.NET Core web apps (and web APIs), the application is protected because you have a `[Authorize]` attribute on the controllers or the controller actions. This attribute checks that the user is authenticated. The code that's initializing the application is in the *Startup.cs* file.
225
+
In ASP.NET Core web apps (and web APIs), the application is protected because you have a `[Authorize]` attribute on the controllers or the controller actions. This attribute checks that the user is authenticated. Prior to the release of .NET6, the code that's initializing the application is in the *Startup.cs* file. New ASP.NET Core projects with .NET 6 no longer contain a *Startup.cs* file. Taking its place is the *Program.cs* file. The rest of this tutorial pertains to .NET 5 or lower.
226
226
227
227
To add authentication with the Microsoft identity platform (formerly Azure AD v2.0), you'll need to add the following code. The comments in the code should be self-explanatory.
Copy file name to clipboardExpand all lines: articles/active-directory/devices/howto-vm-sign-in-azure-ad-linux.md
+28-33Lines changed: 28 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Login in to Linux virtual machine in Azure using Azure Active Directory and openSSH certificate-based authentication
2
+
title: Login to Linux virtual machine in Azure using Azure Active Directory and openSSH certificate-based authentication
3
3
description: Login with Azure AD using openSSH certificate-based authentication to an Azure VM running Linux
4
4
5
5
services: active-directory
@@ -52,13 +52,13 @@ The following Azure regions are currently supported for this feature:
52
52
- Azure Global
53
53
- Azure Government
54
54
- Azure China 21Vianet
55
-
55
+
56
56
It's not supported to use this extension on Azure Kubernetes Service (AKS) clusters. For more information, see [Support policies for AKS](../../aks/support-policies.md).
57
57
58
58
If you choose to install and use the CLI locally, you must be running the Azure CLI version 2.22.1 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI](/cli/azure/install-azure-cli).
59
59
60
60
> [!NOTE]
61
-
> This is functionality is also available for [Azure Arc-enabled servers](../../azure-arc/servers/ssh-arc-overview.md).
61
+
> This functionality is also available for [Azure Arc-enabled servers](../../azure-arc/servers/ssh-arc-overview.md).
62
62
63
63
## Requirements for login with Azure AD using openSSH certificate-based authentication
64
64
@@ -100,17 +100,17 @@ Ensure your VM is configured with the following functionality:
100
100
101
101
Ensure your client meets the following requirements:
102
102
103
-
- SSH client must support OpenSSH based certificates for authentication. You can use Az CLI (2.21.1 or higher) with OpenSSH (included in Windows 10 version 1803 or higher) or Azure Cloud Shell to meet this requirement.
104
-
- SSH extension for Az CLI. You can install this using `az extension add --name ssh`. You don’t need to install this extension when using Azure Cloud Shell as it comes pre-installed.
105
-
- If you’re using any other SSH client other than Az CLI or Azure Cloud Shell that supports OpenSSH certificates, you’ll still need to use Az CLI with SSH extension to retrieve ephemeral SSH cert and optionally a config file and then use the config file with your SSH client.
103
+
- SSH client must support OpenSSH based certificates for authentication. You can use Azure CLI (2.21.1 or higher) with OpenSSH (included in Windows 10 version 1803 or higher) or Azure Cloud Shell to meet this requirement.
104
+
- SSH extension for Azure CLI. You can install this using `az extension add --name ssh`. You don’t need to install this extension when using Azure Cloud Shell as it comes pre-installed.
105
+
- If you’re using any other SSH client other than Azure CLI or Azure Cloud Shell that supports OpenSSH certificates, you’ll still need to use Azure CLI with SSH extension to retrieve ephemeral SSH cert and optionally a config file and then use the config file with your SSH client.
106
106
- TCP connectivity from the client to either the public or private IP of the VM (ProxyCommand or SSH forwarding to a machine with connectivity also works).
107
107
108
108
> [!IMPORTANT]
109
109
> SSH clients based on PuTTy do not support openSSH certificates and cannot be used to login with Azure AD openSSH certificate-based authentication.
110
110
111
-
## Enabling Azure AD login in for Linux VM in Azure
111
+
## Enabling Azure AD login for Linux VM in Azure
112
112
113
-
To use Azure AD login in for Linux VM in Azure, you need to first enable Azure AD login option for your Linux VM, configure Azure role assignments for users who are authorized to login in to the VM and then use SSH client that supports OpensSSH such as Az CLI or Az Cloud Shell to SSH to your Linux VM. There are multiple ways you can enable Azure AD login for your Linux VM, as an example you can use:
113
+
To use Azure AD login for Linux VM in Azure, you need to first enable Azure AD login option for your Linux VM, configure Azure role assignments for users who are authorized to login to the VM and then use SSH client that supports OpensSSH such as Azure CLI or Azure Cloud Shell to SSH to your Linux VM. There are multiple ways you can enable Azure AD login for your Linux VM, as an example you can use:
114
114
115
115
- Azure portal experience when creating a Linux VM
116
116
- Azure Cloud Shell experience when creating a Windows VM or for an existing Linux VM
@@ -127,7 +127,7 @@ As an example, to create an Ubuntu Server 18.04 Long Term Support (LTS) VM in Az
127
127
1. Check the box to enable **Login with Azure Active Directory (Preview)**.
128
128
1. Ensure **System assigned managed identity** is checked.
129
129
1. Go through the rest of the experience of creating a virtual machine. During this preview, you’ll have to create an administrator account with username and password or SSH public key.
130
-
130
+
131
131
### Using the Azure Cloud Shell experience to enable Azure AD login
132
132
133
133
Azure Cloud Shell is a free, interactive shell that you can use to run the steps in this article. Common Azure tools are preinstalled and configured in Cloud Shell for you to use with your account. Just select the Copy button to copy the code, paste it in Cloud Shell, and then press Enter to run it. There are a few ways to open Cloud Shell:
@@ -148,15 +148,13 @@ The example can be customized to support your testing requirements as needed.
148
148
149
149
```azurecli-interactive
150
150
az group create --name AzureADLinuxVM --location southcentralus
151
-
152
151
az vm create \
153
152
--resource-group AzureADLinuxVM \
154
153
--name myVM \
155
154
--image UbuntuLTS \
156
155
--assign-identity \
157
156
--admin-username azureuser \
158
157
--generate-ssh-keys
159
-
160
158
az vm extension set \
161
159
--publisher Microsoft.Azure.ActiveDirectory \
162
160
--name AADSSHLoginForLinux \
@@ -184,9 +182,8 @@ There are multiple ways you can configure role assignments for VM, as an example
184
182
- Azure AD Portal experience
185
183
- Azure Cloud Shell experience
186
184
187
-
> [!Note]
185
+
> [!NOTE]
188
186
> The Virtual Machine Administrator Login and Virtual Machine User Login roles use dataActions and can be assigned at the management group, subscription, resource group, or resource scope. It is recommended that the roles be assigned at the management group, subscription or resource level and not at the individual VM level to avoid risk of running out of [Azure role assignments limit](../../role-based-access-control/troubleshooting.md#azure-role-assignments-limit) per subscription.
189
-
190
187
### Using Azure AD Portal experience
191
188
192
189
To configure role assignments for your Azure AD enabled Linux VMs:
@@ -198,7 +195,7 @@ To configure role assignments for your Azure AD enabled Linux VMs:
198
195
1. Select **Add** > **Add role assignment** to open the Add role assignment page.
199
196
200
197
1. Assign the following role. For detailed steps, see [Assign Azure roles using the Azure portal](../../role-based-access-control/role-assignments-portal.md).
201
-
198
+
202
199
| Setting | Value |
203
200
| --- | --- |
204
201
| Role |**Virtual Machine Administrator Login** or **Virtual Machine User Login**|
@@ -207,7 +204,7 @@ To configure role assignments for your Azure AD enabled Linux VMs:
207
204

208
205
209
206
After a few moments, the security principal is assigned the role at the selected scope.
210
-
207
+
211
208
### Using the Azure Cloud Shell experience
212
209
213
210
The following example uses [az role assignment create](/cli/azure/role/assignment#az-role-assignment-create) to assign the Virtual Machine Administrator Login role to the VM for your current Azure user. The username of your current Azure account is obtained with [az account show](/cli/azure/account#az-account-show), and the scope is set to the VM created in a previous step with [az vm show](/cli/azure/vm#az-vm-show). The scope could also be assigned at a resource group or subscription level, normal Azure RBAC inheritance permissions apply.
@@ -224,14 +221,13 @@ az role assignment create \
224
221
225
222
> [!NOTE]
226
223
> If your Azure AD domain and logon username domain do not match, you must specify the object ID of your user account with the `--assignee-object-id`, not just the username for `--assignee`. You can obtain the object ID for your user account with [az ad user list](/cli/azure/ad/user#az-ad-user-list).
227
-
228
224
For more information on how to use Azure RBAC to manage access to your Azure subscription resources, see the article [Steps to assign an Azure role](../../role-based-access-control/role-assignments-steps.md).
229
225
230
-
## Install SSH extension for Az CLI
226
+
## Install SSH extension for Azure CLI
231
227
232
-
If you’re using Azure Cloud Shell, then no other setup is needed as both the minimum required version of Az CLI and SSH extension for Az CLI are already included in the Cloud Shell environment.
228
+
If you’re using Azure Cloud Shell, then no other setup is needed as both the minimum required version of Azure CLI and SSH extension for Azure CLI are already included in the Cloud Shell environment.
233
229
234
-
Run the following command to add SSH extension for Az CLI
230
+
Run the following command to add SSH extension for Azure CLI
235
231
236
232
```azurecli
237
233
az extension add --name ssh
@@ -245,10 +241,10 @@ az extension show --name ssh
245
241
246
242
## Using Conditional Access
247
243
248
-
You can enforce Conditional Access policies such as require multi-factor authentication, require compliant or hybrid Azure AD joined device for the device running SSH client, and checking for risk before authorizing access to Linux VMs in Azure that are enabled with Azure AD login in. The application that appears in Conditional Access policy is called "Azure Linux VM Sign-In".
244
+
You can enforce Conditional Access policies such as require multi-factor authentication, require compliant or hybrid Azure AD joined device for the device running SSH client, and checking for risk before authorizing access to Linux VMs in Azure that are enabled with Azure AD login. The application that appears in Conditional Access policy is called "Azure Linux VM Sign-In".
249
245
250
246
> [!NOTE]
251
-
> Conditional Access policy enforcement requiring device compliance or Hybrid Azure AD join on the client device running SSH client only works with Az CLI running on Windows and macOS. It is not supported when using Az CLI on Linux or Azure Cloud Shell.
247
+
> Conditional Access policy enforcement requiring device compliance or Hybrid Azure AD join on the client device running SSH client only works with Azure CLI running on Windows and macOS. It is not supported when using Azure CLI on Linux or Azure Cloud Shell.
252
248
253
249
### Missing application
254
250
@@ -273,7 +269,7 @@ Another way to verify it is via Graph PowerShell:
273
269
274
270
## Login using Azure AD user account to SSH into the Linux VM
275
271
276
-
### Using Az CLI
272
+
### Using Azure CLI
277
273
278
274
First do az login and then az ssh vm.
279
275
@@ -289,15 +285,15 @@ The following example automatically resolves the appropriate IP address for the
289
285
az ssh vm -n myVM -g AzureADLinuxVM
290
286
```
291
287
292
-
If prompted, enter your Azure AD login credentials at the login page, perform an MFA, and/or satisfy device checks. You’ll only be prompted if your az CLI session doesn’t already meet any required Conditional Access criteria. Close the browser window, return to the SSH prompt, and you’ll be automatically connected to the VM.
288
+
If prompted, enter your Azure AD login credentials at the login page, perform an MFA, and/or satisfy device checks. You’ll only be prompted if your Azure CLI session doesn’t already meet any required Conditional Access criteria. Close the browser window, return to the SSH prompt, and you’ll be automatically connected to the VM.
293
289
294
290
You’re now signed in to the Azure Linux virtual machine with the role permissions as assigned, such as VM User or VM Administrator. If your user account is assigned the Virtual Machine Administrator Login role, you can use sudo to run commands that require root privileges.
295
291
296
-
### Using Az Cloud Shell
292
+
### Using Azure Cloud Shell
297
293
298
-
You can use Az Cloud Shell to connect to VMs without needing to install anything locally to your client machine. Start Cloud Shell by clicking the shell icon in the upper right corner of the Azure portal.
299
-
300
-
Az Cloud Shell will automatically connect to a session in the context of the signed in user. During the Azure AD Login for Linux Preview, **you must run az login again and go through an interactive sign in flow**.
294
+
You can use Azure Cloud Shell to connect to VMs without needing to install anything locally to your client machine. Start Cloud Shell by clicking the shell icon in the upper right corner of the Azure portal.
295
+
296
+
Azure Cloud Shell will automatically connect to a session in the context of the signed in user. During the Azure AD Login for Linux Preview, **you must run az login again and go through an interactive sign in flow**.
301
297
302
298
```azurecli
303
299
az login
@@ -310,7 +306,7 @@ az ssh vm -n myVM -g AzureADLinuxVM
310
306
```
311
307
312
308
> [!NOTE]
313
-
> Conditional Access policy enforcement requiring device compliance or Hybrid Azure AD join is not supported when using Az Cloud Shell.
309
+
> Conditional Access policy enforcement requiring device compliance or Hybrid Azure AD join is not supported when using Azure Cloud Shell.
314
310
315
311
### Login using Azure AD service principal to SSH into the Linux VM
316
312
@@ -332,7 +328,7 @@ Use the following example to authenticate to Azure CLI using the service princip
332
328
az login --service-principal -u <sp-app-id> -p <password-or-cert> --tenant <tenant-id>
333
329
```
334
330
335
-
Once authentication with a service principal is complete, use the normal Az CLI SSH commands to connect to the VM.
331
+
Once authentication with a service principal is complete, use the normal Azure CLI SSH commands to connect to the VM.
336
332
337
333
```azurecli
338
334
az ssh vm -n myVM -g AzureADLinuxVM
@@ -388,13 +384,12 @@ az ssh vm --ip 10.11.123.456
388
384
For customers who are using previous version of Azure AD login for Linux that was based on device code flow, complete the following steps using Azure CLI.
389
385
390
386
1. Uninstall the AADLoginForLinux extension on the VM.
391
-
387
+
392
388
```azurecli
393
389
az vm extension delete -g MyResourceGroup --vm-name MyVm -n AADLoginForLinux
394
390
```
395
391
> [!NOTE]
396
392
> The extension uninstall can fail if there are any Azure AD users currently logged in on the VM. Make sure all users are logged off first.
397
-
398
393
1. Enable system-assigned managed identity on your VM.
399
394
400
395
```azurecli
@@ -417,11 +412,11 @@ Use Azure Policy to ensure Azure AD login is enabled for your new and existing L
417
412
418
413
## Troubleshoot sign-in issues
419
414
420
-
Some common errors when you try to SSH with Azure AD credentials include no Azure roles assigned, and repeated prompts to signin. Use the following sections to correct these issues.
415
+
Some common errors when you try to SSH with Azure AD credentials include no Azure roles assigned, and repeated prompts to sign-in. Use the following sections to correct these issues.
421
416
422
417
### Couldn’t retrieve token from local cache
423
418
424
-
You must run az login again and go through an interactive signin flow. Review the section [Using Az Cloud Shell](#using-az-cloud-shell).
419
+
You must run `az login` again and go through an interactive sign-in flow. Review the section [Using Azure Cloud Shell](#using-azure-cloud-shell).
# Bulk download a list of groups in Azure Active Directory
20
20
21
-
Using Azure Active Directory (Azure AD) portal, you can bulk download the list of all the groups in your organization to a comma-separated values (CSV) file. All admins and non-admin users can download group lists.
21
+
You can download a list of all the groups in your organization to a comma-separated values (CSV) file in the portal for Azure Active Directory (Azure AD), part of Microsoft Entra. All admins and non-admin users can download group lists.
# Bulk add group members in Azure Active Directory
19
19
20
-
Using Azure Active Directory (Azure AD) portal, you can add a large number of members to a group by using a comma-separated values (CSV) file to bulk import group members.
20
+
You can add multiple members to a group by using a comma-separated values (CSV) file to bulk import group members in the portal for Azure Active Directory (Azure AD), part of Microsoft Entra.
# Bulk remove group members in Azure Active Directory
19
19
20
-
Using Azure Active Directory (Azure AD) portal, you can remove a large number of members from a group by using a comma-separated values (CSV) file to bulk remove group members.
20
+
You can remove a large number of members from a group by using a comma-separated values (CSV) file to remove group members in bulk using the portal for Azure Active Directory (Azure AD), part of Microsoft Entra.
0 commit comments