cancel
Showing results for 
Search instead for 
Did you mean: 

Creating user accounts through API?

Greg_Rott
Champ in-the-making
Champ in-the-making

Hello, we are evaluation need for getting an API certification license. 

Following a trigger, workflow needs to run Unity Script that creates Onbase account based on a keyword value of a certain document type. 


Is it possible for Unity script  to create an onbase account  in the system ? we need to name that account from a variable we get from a keyword of a document.

Thank you

1 ACCEPTED ANSWER

Scott_Johnson3
World-Class Innovator
World-Class Innovator

Hi Greg

Your requirements are very doable with the API.  I have an automated online process using unity forms and the API to create accounts after they reply to an email to confirm the validity of the email address.

Good Luck

Scott

View answer in original post

6 REPLIES 6

Hi Scott, my email is grott@primehealthcare.com

Thank you so much again!

Alex_French
Elite Collaborator
Elite Collaborator

Here's an example of the simplest specific API calls you need to make.  It does not show all available options, and it doesn't need to be as spelled out step-by-step as this, you can make it all a reasonable one-liner if you want.

 

//you don't need to do this, but it will save you few characters if you're using it repeatedly

UserAdministration myUserAdmin = app.Core.UserAdministration;

//Define the user you'll create

NewUserProperties myUserProps =

        myUserAdmin.CreateNewUserProperties("name", "password");

//Create the user

myUserAdmin.CreateUser(myUserProps);

 

If you want to add the new User to User Groups right away, you can do that by assigning myUserProps.UserGroups to a List<UserGroup>.  It has to be a List<> even if you want just one user group.  If you've already retrieved a single User Group that could be:

myUserAdmin.UserGroups = new List<UserGroup> { mySingleUserGroup };

To find the UserGroup object(s) you want you will probably work with the myUserAdmin.GetGroups() and then .Find() or .FindAll, depending on what you need to retrieve.

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.