Examples for the PTC Principal Management Domain
Retrieving License Groups for a User
Example: Retrieving License Groups for a User
This example shows you how to retrieve license groups for a user by specifying the user OID in the request URI.
Use the following GET URI.
URI
GET /Windchill/servlet/odata/PrincipalMgmt/Users('<OID>')/LicenseGroups
The request returns only the immediate parent license groups of which the specified user is a member.
You can also retrieve license groups for the specified user using the following GET URI with expand:
URI with Expand on LicenseGroups
GET /Windchill/servlet/odata/PrincipalMgmt/Users('<OID>')?$expand=LicenseGroups
The request returns only the immediate parent license groups of which the specified user is a member.
To retrieve license groups for a user using typecasting, you can use the following GET URI:
URI with Typecast
GET /Windchill/servlet/odata/PrincipalMgmt/Users('<OID>')/Groups/PTC.PrincipalMgmt.LicenseGroup
The request returns only the immediate parent license groups of which the specified user is a member.