Terraform import fails on Genesys Cloud user with 404

Trying to import an existing user into Terraform state. The command terraform import gen_cloud_user.main 12345-67890 returns a 404 Not Found error. The user exists and I can query it via the REST API.

$ terraform import gen_cloud_user.main 12345-67890
Error: 404 Not Found

The OAuth client has the users:view scope. What is wrong with this command?

That 404 usually means the OAuth scope is insufficient for the underlying GET request Terraform runs. Add users:read to your client credentials and retry.

is on the right track, but users:read isn’t always enough depending on the provider version. The 404 often happens because the import command tries to fetch the user details using the ID, and if the scope doesn’t match what the underlying API expects for that specific endpoint, it fails silently or returns 404.

Check if your Terraform provider is using /api/v2/users/{id} directly. If so, users:read should work. If it’s doing something else, you might need users:view plus admin:users depending on the user’s role or if they are disabled.

Also, double-check the ID format. Some providers expect the full URI or a different identifier. Try this to verify the API call manually:

curl -X GET "https://api.mypurecloud.com/api/v2/users/12345-67890" \
 -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
 -H "Accept: application/json"

If this returns 404, the scope or ID is wrong. If it returns 200, the issue is likely in how the Terraform provider constructs the import request. You might need to specify the import block differently or update the provider version.