Open qbui-os opened 6 days ago
Also I did follow the instruction to fetch the Application User, then modify the profile, I did not generate the profile by code.
I tried the above steps for many hours before submitting this ticket. However, I successfully moved pass the error just now.
I simply removed all the properties in the profile
that I don't wanna update (or keep the current value from Okta), and it just work?...
I only needed to change the accountId
, so my successful payload was:
{'profile': {'accountId': 'newId'}}
This is REALLY confusing, because the only reason I kept the entire App User profile fetched on Okta is because of this note on the Okta API Doc:
Note: The Okta API currently doesn't support entity tags for conditional updates. As long as you're the only user updating the the user profile, Okta recommends you fetch the most recent profile with Retrieve an Application User, apply your profile update, and then POST back the updated profile.
I noticed the strange behavior while playing with the keep_empty_params
flag, when I set it to True
, even more properties appear in the error message (all of the existed and not null/empty, yet were reported 'not found' by the error). So I took a wild guess "less is more" and deleted all the unchanged properties and gave it one last go, and... WALAH.
Okta version:
2.9.8
Descriptions
Hi, I am trying to update an Application User profile using
update_application_user()
but keep encountering this error:The problem is,
givenName
&familyName
properties are already existing inside the User profile payload & not NULL. I cannot provide the payload due to customer data protection policy, but the profile looks something like this.What I have done
app_user
paramapp_user
paramassignment: {givenName, familyName}
property to the User dictgiveName
andfamilyName
directly to the User dictgive_name
andfamily_name
to User profile (based on sample on Okta API Doc, I thought maybe there is some sort of mapping?)