Azure / azure-devtestlab

Azure DevTestLab artifacts, scripts and samples
MIT License
458 stars 602 forks source link

Account permissions necessary to use Az.LabServices.psm1 (QUESTION) #821

Closed jharri3470 closed 2 years ago

jharri3470 commented 2 years ago

I have been using Az.LabServices.psm1 for some time now. However, I have only ever been able to get it to work properly using an account with "owner" role in Az directory. Is there a more restricted role that can be used? I do a mix of querying to determine what machines are running, and then stopping machines that need to be started or stopped. I don't do any creation of anything using this module.

RogerBestMsft commented 2 years ago

@jharri3470 You can use contributor role to do vm querying and starting or stopping. What is the specific role you are using?

RogerBestMsft commented 2 years ago

The PowerShell module https://www.powershellgallery.com/packages/Az.LabServices/0.1.0 uses RBAC to determine access.