-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update-VSTeamUser may not be able to validate a user per email when user count is greater than 100 #90
Comments
Looking into this. Thanks. |
The best we can do if the user wants to use email is pass in the max top of 10,000. However, this feels very inefficient. If you have that many users you would be better off finding the ID using Get-VSTeamUser yourself first. Then calling Update-VSTeamUser by ID instead of by Email. The filter only lets you filter by extensionId today which does not help in this situation. If at some point they add user.principalName or user.mailAddress we can update this code. For now, I will pass in the Max Top of 10,000. I will also update the help to explain the costs. |
Set top to 10,000 when searching by email Updated help for Update-VSTeamUser Fixed issue where api version was not being set on load.
Fixed in PR 96 |
Great :) |
Update-VSTeamUser validates that the user submitted by email exists using the following code :
$user = Get-VSTeamUser | Where-Object email -eq $email
As Get-VSTeamUser only returns the top 100 users, the user to be validated may not be found.
The text was updated successfully, but these errors were encountered: