How to access Resource Assignments (OwnerAssignedResourceTypes) from C# expressions?

Hello,

I’m configuring automatic assignment rules and computed properties in Netwrix Identity Manager.

From the REST API, we can access the OwnerAssignedResourceTypes of an Identity.

For example, using this API call:

/api/Resource/Directory_User/{id}?api-version=1.0
&squery= join OwnerAssignedResourceTypes art
join art.Resource artre
join art.Role artr

&Path=/Custom/Resources/Directory_User/ViewOwnedResources

This returns all resource type assignments for the identity, including the ResourceType code, provisioning state, workflow state, etc.

My question:

Is it possible to access these resource assignments (the same ones returned under OwnerAssignedResourceTypes in the API) from within a C# expression?

If yes:

  • What is the supported syntax to read those properties?

  • What entity or collection name do they appear under in the C# rule engine?

If not:

  • What is the recommended method to detect whether a resource type is already assigned to an identity?

Thank you!