How can Okta create records on cmn_department

Chris5
Kilo Expert

I have set up Okta on my instance and currently use it to provision users.  What I would like to do next is have Okta create records on cmn_department. When a new department is created in AD I would like it to be added to ServiceNow.

I think I need to use REST API but I'm not really sure where to get started.  Any help is really appreciated.

1 ACCEPTED SOLUTION

Chris5
Kilo Expert

After working with Okta support a confirm at this time this is not possible.

View solution in original post

16 REPLIES 16

Raf1
Tera Guru

Hi Chris,

How are you currently populating your User table? 

One way of adding new department is using the transform map for user feed.

You can select choice action "create" so new department not existing in your instance are added.

find_real_file.png

If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.

 If you are viewing this from the community inbox you will not see the correct answer button. If so, please review How to Mark Answers Correct From Inbox View.

Regards,

Raf

 

Thanks for the reply, I am actually creating the users via Okta.

 

When a new user is created in okta it creates the record is sys_user and actually populates the department.  This only happens if the department already exists.  If it does not exist it fails.  (pic included)find_real_file.png

I see, you can then consider using a scripted Rest API to add this department.

This previous reply from Chuck should help you.

https://community.servicenow.com/community?id=community_question&sys_id=8a5803eddb1cdbc01dcaf3231f96...

ARG645
Tera Guru
Are your user provisioned as a part of singlSongOn ? Or, is Okta making an API call to ServiceNow to import the users ? Either way, the data has to go through transform maps. You need to spot the transform map, and inspect the logic that assignes the existing cmn_departmen to the user. Then, from there you can edit the logic to add the department if it’s not found.