Azure-docs: PowerShell steps to AzAD-login to LinuxAzVM

Created on 28 Mar 2019  Â·  5Comments  Â·  Source: MicrosoftDocs/azure-docs

How do I do this thru PowerShell? can someone share how to do this thru Invoke-RestMethod if the cmdlets aren't there yet?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

cxp in-progress product-question triaged virtual-machines-linusvc

All 5 comments

There is a 3rd party blog that shows how to do it using PowerShell. All this is really doing is setting the extension so using PowerShell should work fine

https://blog.azureandbeyond.com/2018/07/31/aad-login-linux/

We currently just have the official doc using CLI. This is partly because this feature is in preview so once it moves into GA more examples will be added. And also, since this is specific to Linux VMs we find that most users working with Linux VMs are more familiar with CLI so that is why we went with a CLI example to start with.

@Ayanmullick I will close for now. Thank you again for all the feedback you give on the docs. It really does help us prioritize and improve them.

I have made sure to send this feedback to the product teams as well and as we move out of preview you will see more examples :)

I had to use the objectid instead of the signin name since I was using a live id. But it works.

Set-AzureRmVMExtension -Publisher Microsoft.Azure.ActiveDirectory.LinuxSSH -Name AADLoginForLinux -ResourceGroupName <> -VMName <> -Location eastus2 -ExtensionType AADLoginForLinux -TypeHandlerVersion 1.0 -Verbose

New-AzureRmRoleAssignment -ObjectId <> -RoleDefinitionName "Virtual Machine Administrator Login" -Scope $scope -Verbose

Thanks for sharing the link.

@MicahMcKittrick-MSFT, The above doesn't create the device in AAD. Is there a separate extension for that?

Not sure what you are referring to. Can you elaborate?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spottedmahn picture spottedmahn  Â·  3Comments

varma31 picture varma31  Â·  3Comments

jamesgallagher-ie picture jamesgallagher-ie  Â·  3Comments

ianpowell2017 picture ianpowell2017  Â·  3Comments

AronT-TLV picture AronT-TLV  Â·  3Comments