How to: Include new users based on active user permissions on Azure DevOps using Azure DevOps CLI

  1. PowerShell script will receive the following parameters:
  • $PAT = Personal Access token to connect on Azure DevOps;
  • $Organization = Organization URL to which the user will be included;
  • $newUser = valid new user e-mail;
  • $newUserLicenseType = License type for the user. Allowed values: {advanced, earlyAdopter, express, professional, stakeholder};
  • $activeUser = active user email.
az devops user add — email-id
— license-type {advanced, earlyAdopter, express, professional, stakeholder}
[ — detect {false, true}]
[ — org]
[ — send-email-invite {false, true}]
az devops security group membership list --id
[--detect {false, true}]
[--org]
[--relationship {memberof, members}]
az devops security group membership add --group-id
--member-id
[--detect {false, true}]
[--org]

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Vinicius Moura

Vinicius Moura

Tech Solution Architect Manager na Accenture