I should be able to add a user entitlement to a service principal using a full-access PAT belonging to the ADO organization owner.
Actual Behavior
Server side failure :(
Creating user entitlement: Adding user entitlement: (5000) The Id, OriginId, or User.PrincipalName must be set. The Principal Name is usually an email address.
I can add the service principal through the UI and then import the resource, for what it's worth, so it doesn't seem like it's a credential issue.
Steps to Reproduce
Create a new ADO org, or use an existing one.
Authenticate as org owner.
Create a PAT that is granted full access
Make PAT available to terraform
terraform apply
Weep
Important Factoids
This is a vanilla US azure tenant. I've tried this with several ADO orgs and with several service principals, the result is the same.
Community Note
Terraform (and Azure DevOps Provider) Version
Affected Resource(s)
azuredevops_user_entitlement
Terraform Configuration Files
Debug Output
https://gist.github.com/tdg5/30e58f99ab019e04b577755c4e8d3578
Panic Output
Expected Behavior
I should be able to add a user entitlement to a service principal using a full-access PAT belonging to the ADO organization owner.
Actual Behavior
Server side failure :(
I can add the service principal through the UI and then import the resource, for what it's worth, so it doesn't seem like it's a credential issue.
Steps to Reproduce
terraform apply
Important Factoids
This is a vanilla US azure tenant. I've tried this with several ADO orgs and with several service principals, the result is the same.
References
I think @fredgate may have also hit this error and thought it was something else: https://github.com/microsoft/terraform-provider-azuredevops/issues/444#issuecomment-2153117611