Skip to content
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

powerplatform_user: index out of range [0] with length 0 error #615

Closed
mawasile opened this issue Mar 5, 2025 · 0 comments · Fixed by #622
Closed

powerplatform_user: index out of range [0] with length 0 error #615

mawasile opened this issue Mar 5, 2025 · 0 comments · Fixed by #622
Labels
bug Something isn't working community Request or issue originated from a customer or community request resource terraform resource
Milestone

Comments

@mawasile
Copy link
Contributor

mawasile commented Mar 5, 2025

Describe the bug

panic: runtime error: index out of range [0] with length 0

[debug]github.com/microsoft/terraform-provider-power-platform/internal/services/authorization.(*client).GetDataverseUserByAadObjectId(0xc000c2efe0, 0xff50f0, 0xc00027a150, 0xc0008628d0?, 0x0?, 0xc0008628a0, 0x24)
[debug] github.com/microsoft/terraform-provider-power-platform/internal/services/authorization/api_user.go:164 +0x54c
[debug]github.com/microsoft/terraform-provider-power-platform/internal/services/authorization.(*client).CreateDataverseUser(0xc000c2efe0, 0xff50f0, 0xc00027a150, 0xc0008628d0, 0x24, 0xc0008628a0, 0x24)

Expected behavior

If dataverse user is being created and it is not had been added to the dataverse yet, we should wait for that to happen for a given period of time and when that still fails, we should return an error to the user, informing that it did not succeeded, and licensing for that user should be validated.

Contribution

Do you plan to raise a PR to address this issue? YES

@mawasile mawasile added the bug Something isn't working label Mar 5, 2025
@mawasile mawasile added this to the P0 milestone Mar 5, 2025
@mawasile mawasile added resource terraform resource community Request or issue originated from a customer or community request labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community Request or issue originated from a customer or community request resource terraform resource
Projects
None yet
1 participant