cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Can we create a user using a trigger or Java code

Shree
6-Contributor

Can we create a user using a trigger or Java code

Hi Guys,

 

I need to create a user using a trigger is it possible ?

If yes can you tell me how ?

If no cab you tell me the reason ?

 

Thanks,

Shree

1 ACCEPTED SOLUTION

Accepted Solutions
Shree
6-Contributor
(To:VolkerEckardt)

yes, the user will be imported from LDAP, but the account is active only when the user login into the integrity for the 1st time.

For my business:

There will be certain user's how wont use Integrity. Such user data wont be available in the Integrity. So i need to add them into integrity.

View solution in original post

8 REPLIES 8

Sure, you can.

If not part of the trigger bean, you can always call the related API command.

 

Just for interest: why you need to create a user in a trigger? Usually users will get imported from e.g. LDAP.

So you will have to import them or assign them to groups only.

Shree
6-Contributor
(To:VolkerEckardt)

yes, the user will be imported from LDAP, but the account is active only when the user login into the integrity for the 1st time.

For my business:

There will be certain user's how wont use Integrity. Such user data wont be available in the Integrity. So i need to add them into integrity.

Hi,

I am using 2 steps to "Import" a user from LDAP:

1/

integrity editmksdomaingroup --user=<execution user> --hostname=<host> --addMembers=u=<NewUserId> "GroupNameToAddTo"

2/

im importuser --user=<execution user> --hostname=<host> <NewUserId>

 

Then, this user is available in Integrity W&D.

 

Perhaps this helps.

Volker

PS: I could perform also both steps in the UI, but the command line is much much faster 🙂

Shree
6-Contributor
(To:VolkerEckardt)

yup , exactly we can import the user form LDAP manually but how to make it automatic, How can we do this using Java API or trigger

 

kjain-2
15-Moonstone
(To:Shree)

@Shree,

 

Automatic means what ? even if you make JAVA API or trigger to run these CLI commands told by @VolkerEckardt also still you need to define Which user you want to import and Which Group it refers to ? How code can automatically know which user to import and when to Import and it's related Group ?

So rather then managing this via code CLI is much faster as @VolkerEckardt also said. 

 

I hope it clears to you now ? 

 

Kapil

Shree
6-Contributor
(To:kjain-2)

Yes, you are absolutely correct, so is there any function to check is that particular user is present in the Integrity or not.

kjain-2
15-Moonstone
(To:Shree)

Shree,

 

I am still curious to know what you want to accomplish even if some method is there , what method can do for you here in this scenario ? May i know lil more about your thought process ?

 

Thanks Shree.

 

Kapil 

Shree
6-Contributor
(To:kjain-2)

We are having a web service which will fetch the value form External Application and it will update in integrity.

While it is updating it will throw user not present exception. In order to over come,particular user as to login into Integrity which is not possible to all the user. So i need to add the user using trigger.

 

Thank you guys for your valuable  feedback ,I got the solution.

Top Tags