To invite external users into VSTS, we first need to add them to the AAD directory. We can do this today with PowerShell, but you need the right module installed.
Make sure you have the
AzureADPreview module installed.
If you need it, from an admin powershell prompt, you can use:
To update it later:
To remove it once it hits the stable module:
If you have the
AzureAD module already installed, you’ll likely get conflicts—best to remove it first with
- Connect to Azure AD:
Connect-AzureAD. Login with your AAD creds
$newuser = New-AzureADMSInvitation -InvitedUserDisplayName "first last" -InvitedUserEmailAddress "firstname.lastname@example.org" -SendInvitationMessage $True -InviteRedirectUrl "https://<account>.visualstudio.com"
- You can view the properties then by just entering in $newuser, which will show you the status should you want to see it. You may need this for the invite redeem URL if their AAD sign in name is not their email address.
- You can check the acceptance status in the Azure Portal under AAD -> All Users -> search. In the user profile, you can see the "Source" property of either "Invited User", "External AAD" or "Microsoft Account." The first one means they haven’t accepted yet. Doesn’t seem to be a way to check the acceptance status with PowerShell yet.