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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Translate the entire conversation x

is there api to add multiple user to a role

SB_10904295
11-Garnet

is there api to add multiple user to a role

Is there a api which lets us add multiple users to single role. 

ACCEPTED SOLUTION

Accepted Solutions

I used this method and it works.

team.addPrincipals(HashMap map);

View solution in original post

5 REPLIES 5

Hi @SB_10904295 

 

Thank you for your question! 

 

I’d like to recommend to bring more details and context to your initial inquiry. For example:

  • What version of product you're using?

Please add screenshot(s) to better understand what you are trying to do in your process. 

 

Please refer to this guideline to make your questions more likely to receive a quick and useful answer. 

This will increase your chances to receive meaningful help from other Community members. 

 

Here's what a good question for Windchill  looks like. 

 

Thank you for your participation and please let me know if you need further assistance! 

 

Best regards,


Catalina
PTC Community Moderator
PTC
Fadel
22-Sapphire III
(To:SB_10904295)

some inspiration can be found below 

https://www.ptc.com/en/support/article/CS355528 

Fede
HelesicPetr
22-Sapphire II
(To:SB_10904295)

Hi @SB_10904295 

Try to check following class and method.

https://www.ptc.com/en/support/article/CS138084

 

I guess that you have to use while/for loop to add more users.

or you can try following method but I've never use it. 

addRolePrincipalMap(HashMap var1, WTRoleHolder2 var2)

 

PetrH

I used this method and it works.

team.addPrincipals(HashMap map);

HelesicPetr
22-Sapphire II
(To:SB_10904295)

Hi @SB_10904295 

Can you explain what values do you use in the HasMap input please? it would be useful for others. 

Thank you

PetrH 

Announcements

Top Tags