Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get user associated group info

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
santoshr0114
925 Views, 6 Replies

Get user associated group info

Dear All,

 

How to get all the groupinfo's associated to a particular user.

 

Ex:

 

User : Santosh is associated to Design & Production gruops.

 

Using API i need to get the groups the user "Santosh" is associated with.

 

Any example would be helpful.

 

Thank You in advance

Regards
Santosh
Tags (3)
6 REPLIES 6
Message 2 of 7
minkd
in reply to: santoshr0114

There is no way for a regular user to get GroupInfo objects - only Administrators can do that.


However, if you are trying to determine if a user is in a specific group, you can do that with the GetGroupByName call in the AdminService. If the user is in the group, it will return a Group object (not a GroupInfo object); otherwise, it will throw a PermissionDenied exception.


-Dave



Dave Mink
Fusion Lifecycle
Autodesk, Inc.
Message 3 of 7
santoshr0114
in reply to: minkd

Thank You for your reply.

 

i am aware that i have to be logged in as administrator.

I want to know what groups a specific user is associated with.

 

Currently i am running a loop using individual userid in groups and gettgin the output perfectly.

 

Is there any other method to accompish the same task..?

Regards
Santosh
Message 4 of 7
Redmond.D
in reply to: santoshr0114

Yes, cycling through all the groups and users is really the only way to do it.  Keep in mind that groups can have groups, so a user may be "in" a group even if there is no direct link to that group.  Effective Permissions has some code related to this issue, so you may want to have a look at the code.



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 5 of 7
santoshr0114
in reply to: Redmond.D

Thank you for your reply Doug.

Will try the method
Regards
Santosh
Message 6 of 7
Alainmorin
in reply to: santoshr0114

Did you have any luck Santosh?

Message 7 of 7
Maarten65
in reply to: santoshr0114

Can you publish the code which scanned all users and their groups?

 

 

Maarten Weers
Technical Specialist CAD - EMEA
Parker Hannifin
Oldenzaal - The Netherlands
-------------------------------------------------------------------------------------------
Inventor Pro 2019 - Vault Professional 2019 - Windows 10 64 bit -

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report