Solved

Smart Object to add user to Role?

  • 29 October 2019
  • 6 replies
  • 90 views

Badge +8

Hi there. 

 

I am sure this has been asked, but I just can't find it.  

 

Does a system smart object exist that would put a user into a specified role without having to manually add them using hte management console?

 

I have a large number of users I'd like to put into specific roles, and I would love to create a workflow to do it by readin ga list of usernames from a table rather than having to add them to the role one at a time (there are hundreds of users).  

 

I've looked at the Smart Object Service tester for K2 5.2 and I am not seeing anything, but maybe I'm missing it? 

 

Thanks,

 

Rob

 

icon

Best answer by DanielKarlsson 31 October 2019, 14:40

View original

6 replies

Good day   @Robert_Nicholas


 


Please see the following posts: https://community.k2.com/t5/K2-Five/assign-role-using-smartobject/td-p/103501


Post(2): https://community.k2.com/t5/K2-Five/SmartObject-Is-User-Member-Of-Role/td-p/108508


You might also want to read the following article to make you aware of behavioural changes 


of Role Membership using SmartObject Methods in K2 Five: https://help.k2.com/kb002145


 


Best regards,


Dumisani


 


 


 


 

Badge +7

Please Have a look at the following:

(1) Return all K2 roles a user is a member of

https://help.k2.com/support-services/kbs100062

 

(2) Roles

https://help.k2.com/onlinehelp/k2blackpearl/userguide/4.7/default.htm#6.Administer/Workspace_Legacy/MC-Roles.htm

 

(3) K2 Workflow Designer - Users and Groups SmartObject

 

https://help.k2.com/onlinehelp/k2smartforms/userguide/current/default.htm#k2d4sf_out_of_the_box_users_and_groups.html

 

All the best.

Badge +9

Hi Robert_Nicholas


 


Another alternative way, you can create a group in AD and all users you want to use in the workflow you add them in that group then on the workflow task you add that group.


 


Regards


Elvis

Badge +4

Hi!

 

 

Regards

Daniel

Badge +8

Ding ding!  I think Daniel wins...I'm not 100% sure I'll figure out how to adopt his solution, but I think it's the best one. :)

 

Rob

 

 

Badge +1

Hey @Robert_Nicholas, Did you find a way to do this? Would you able to share the solution here to help me and others out?


 


I have a very similar requirement where we want to be able to add/remove users in a role and build a UI around it so designated Admin can do this without having access to k2 management.


 


None of the old k2 links above work. 😞


 


Also, @DanielKarlsson looking at the screenshot in your solution reply, you built a custom SMO which wraps in-built system SMOs to achieve the same. Would love to get a hand on it if you do not mind instead of trying to reinvent the wheel. 


 


Thanks,


Praveen


 

Reply