I have custom AAD and I added my company account to the AAD. I made the company account owner of the subscription and administrator of the AAD.
When I want to create new Team Project, the deployment fails with message:
VS850006: AAD guest users are not allowed to be account owners. Please use a non-guest AAD user. AAD guest user sign-in address: [email protected] (Code: OrganizationBadRequestException)
It was working yesterday before I made myself AAD administrator. WTF?
You are probably a guest in the AAD that backs VSTS. By default AAD guests cannot search the AAD.
You could check your user type on Azure Portal.Azure Active Directory
-->All Users
--><your user>
-->profile
f the UserType is GUEST, you can make this user a MEMBER by executing
Set-Msoluser -UserPrincipalName <your ID> -usertype member
More information about this please refer to this [blog]
Update:
If your account is a Microsoft account, you could use Azure AD Power Shell 2.0 to change user type.
Connect-Azuread -TenantID "****************"
Get-azureaduser -ObjectID "99f1721e-42ae-4056-9c14-30976aa1608b"|Set-AzureADUser -UserType "member"