Skip to main content
15-Moonstone
Jun 7, 2023 6:16 PM UTC
Solved

How to fetch which user has access to which thing in an info table in thingworx

Hi all,

 

How to fetch which user has access to which thing in an info table!

 

Thank you

 

15-Moonstone
Jun 10, 2023 10:49 AM UTC

Hi @jensc @PaiChung,

 

I used the nested loop!

  •  First listed the things 
  • Applied loop to read 1 by 1 thing
  • Used getRunTimePermission on that thing to get the user info
  • Created info table with the information

This way I was able to achieve the requirements!

 

Thank you for your support!

6 replies

22-Sapphire I
Jun 7, 2023 7:50 PM UTC

I think your best bet is maybe this: https://support.ptc.com/help/thingworx/platform/r9/en/index.html#page/ThingWorx/Help/Composer/Security/Users/AccessReports.html#

The other way, for a Thing, you can pull Visiblity/Permission info I think, which would give you Users and User Groups and you'd have to then determine who are in the User Groups.

Potentially it may not capture Collection level settings, or even inherited permissions 😞

Translate
17-Peridot
Jun 8, 2023 5:55 AM UTC

Hello @PaiChung,

 

There still isn't any way to use the Access Report through some API right?

 

I built my own kind of access report @MM_9023322 using the way PaiChung suggests. Getting all entities in a project and checking the visibility, runtime and design time permissions on each entitiy against a specific username or getting who has permissions for a specific thing.

 

Perhaps I did it in a roundabout way, but I felt it wasn't very performant as I had to do nested loops to get all of the information.

 

Regards,

Jens

Translate
22-Sapphire I
Jun 8, 2023 12:14 PM UTC

The access report itself is based on 'Services' ie API calls.

Just have to discover which ones they are, you should be able to see them using the developer tools.

Translate