Some attributes won't get pushed on user create Skip to main content
https://support.okta.com/help/answers?id=9062a000000xzlxqaw&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Sam JohnsonSam Johnson 

Some attributes won't get pushed on user create

When tyring to create a user using the API some of the attributes don't get pushed to the new Okta user account. Below is my code:
 
curl -v -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: SSWS ${AUTH}" \
-d '{
  "profile": {
    "login": "John.Smith@somecompany.com",
    "firstName": "John",
    "lastName": "Smith",
    "email": "John.Smith@somecompany.com",
    "title": "Okta Admin",
    "city": "Philadelphia",
    "state": "PA",
    "zipCode": "19093",
    "countryCode": "US",
    "costCenter": "PHL",
    "employeeNumber": "employee1",
    "manager": "Bob Smith",
    "organization": "Some Company",
    "department": "Okta"
  },
  "credentials": {
    "password" : { "value": "Password1234" }
  },
  "groupIds": [ 
  "123456" 
  ]
}' "https://company.okta.com/api/v1/users?activate=false"
For some reason the manager, costCenter, employeeNumber, and organization are not getting pushed to the account when this code is ran. Any ideas? Thanks!
Alexandru BungauAlexandru Bungau (Okta, Inc.)
Hi Sam,

I tried the code below in Postman and the attributes for costCenter, employeeNumber, manager and organization are being pushed in my test environment

curl -X POST \
  'https://bungau.okta.com/api/v1/users?activate=false' \
  -H 'accept: application/json' \
  -H 'authorization: SSWS{AUTH}' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: token' \
  -d '{
  "profile": {
    "login": "John.Smith@somecompany.com",
"firstName": "John",
"lastName": "Smith",
"email": "John.Smith@somecompany.com",
"title": "Okta Admin",
"city": "Philadelphia",
"state": "PA",
"zipCode": "19093",
"countryCode": "US",
"costCenter": "PHL",
"employeeNumber": "employee1",
"manager": "Bob Smith",
"organization": "Some Company",
"department": "Okta"
  },
  "credentials": {
    "password" : { "value": "Password1234" }
  }
}
"groupIds": [
"123456"
] '
Sam JohnsonSam Johnson
Hi Alexandru,

Thanks for the reply! I figured out that my issue with not seeing those fields was that the AD to Okta mappings didn't have them set. So it pushed it to AD initially then didn't push back to Okta since they were not in the mappings. Once I set them in the mappings settings they get populated correctly. Thanks for taking a look!