Hey! Having a wonderfully weird scenario when crea...
# gooddata-cloud
r
Hey! Having a wonderfully weird scenario when creating a user via API call: (UserId: b44767e0-532f-4786-b729-c97409f89329) It's throwing an error retrieving GoodData User Info. (User not found). So it seems the API is failing to create the account when we make the call.
k
Thanks for the details. A few common causes in GoodData Cloud can lead to “user not found” right after a create call: 1) Wrong API or base URL - Make sure you’re calling your GoodData Cloud domain (e.g., https://your-org.cloud.gooddata.com), not gooddata.com or a trial/prod mismatch. Using the public site or the wrong hostname returns 404s or HTML responses and won’t create users. [[Users API host](https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1725907026377109?thread_ts=1725907026.377109&cid=C04S1MSLEAW); [HTML response symptom](https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1725907026377109?thread_ts=1725907026.377109&cid=C04S1MSLEAW)] 2) Using the wrong endpoint - In GoodData Cloud, create users via POST /api/v1/entities/users (JSON:API). The /api/v1/auth/users endpoints are for the on‑prem GoodData.CN internal IdP and are not available in Cloud. [[Cloud endpoint](https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1704807005136809?thread_ts=1704807005.136809&cid=C04S1MSLEAW); [Manage users doc](https://www.gooddata.com/docs/cloud/manage-organization/manage-users/)] 3) Organization uses GoodData’s hosted IdP (managed OIDC) - If your org still authenticates via GoodData’s hosted IdP, creating a user only via /entities/users is not enough to let them log in; the account must also exist in the hosted IdP, which you cannot create yourself. In this state, login or “get user info” checks can fail with “user not found.” The workaround is to have GoodData Support provision the user in the hosted IdP, or switch to your own OIDC and manage users end‑to‑end. [[Managed OIDC limitation](https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1707996440776269?thread_ts=1707996440.776269&cid=C04S1MSLEAW); [Provisioning during transition](https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1748500430362489?thread_ts=1748500430.362489&cid=C04S1MSLEAW); [Another example](https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1715351589656319?thread_ts=1715351589.656319&cid=C04S1MSLEAW)] 4) Missing or incorrect authenticationId (sub claim) - For own OIDC, you must set attributes.authenticationId to the user’s OIDC sub claim. If this is wrong or reused for multiple users, authentication and lookups may fail. [[Create user requirements](https://www.gooddata.com/docs/cloud/manage-organization/manage-users/)] 5) Referencing a non-existent userId immediately after a failed create - A 404 “not found” on GET/PUT often means the userId didn’t exist (typo, wrong org, or the create actually failed). Double‑check the POST response status and body; then GET the user to confirm existence. [[404 due to wrong userId](https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1730796596548409?thread_ts=1730796596.548409&cid=C04S1MSLEAW)] What I recommend next - Confirm the exact POST you’re sending (headers + payload) and the response you get. It should be 201 with the created resource. Use: POST /api/v1/entities/users on your org hostname with Content-Type: application/vnd.gooddata.api+json. [[Cloud endpoint](https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1704807005136809?thread_ts=1704807005.136809&cid=C04S1MSLEAW); [Manage users doc](https://www.gooddata.com/docs/cloud/manage-organization/manage-users/)] - Immediately GET the new user to confirm it exists: GET /api/v1/entities/users/b44767e0-532f-4786-b729-c97409f89329?include=userGroups. [[Entity interface tip](https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1707996440776269?thread_ts=1707996440.776269&cid=C04S1MSLEAW)] - Verify whether your org uses GoodData’s hosted IdP or your own OIDC. If hosted IdP, you’ll need Support to provision the identity; if your own OIDC, ensure authenticationId matches the user’s sub claim in your IdP. [[Managed OIDC limitation](https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1707996440776269?thread_ts=1707996440.776269&cid=C04S1MSLEAW); [Sub claim requirement](https://www.gooddata.com/docs/cloud/manage-organization/manage-users/)] If you can share the POST response (status + body) and confirm your OIDC mode, I can help pinpoint why the user lookup says “not found.”
y
Hi Ryan, please let us know if the response provided by our AI assistant was helpful, or if you need further assistance with this. You can also refer to our GoodData cloud API reference documentation here. If the suggested approach does not resolve your issue, could you kindly share a few more details on how you are running the API calls — for example, the specific endpoint being accessed and the method used? This information will help us investigate more effectively.
r
We went through everything, and we're using the correct endpoints. We've got dozens of users repeatedly. We don't know why this one specific scenario is locking this individual in a sort of limbo.
So it seems we ended up potentially modifying the account before the POST completed, but can't find out why
y
Are you able to share a direct link to the workspace/endpoint, to help investigate further?
Hi Ryan, A possible reason why this user creation may be failing is related to how the user details are being passed in the request. If the body of the request does not follow the expected format, or if some required fields are missing or incorrectly structured, the process can fail. We recommend verifying that: • The layout of the user details matches the required schema in the body of the POST request. • All fields ( are provided in the correct format ). • The JSON body and headers is properly structured according to the GoodData API specification. You can also refer to the documentation above for more details. Ensuring the request body is correctly formatted will help avoid provisioning issues. If you’d like, please share an example of the payload you are using, and we can help confirm whether it aligns with the expected format. We will be happy assist further if this doesn't help.