Skip to main content
14-Alexandrite
Oct 22, 2020 1:12 PM UTC
Solved

How to get the Alternate usernames of WTUser using API

Hi,

 

Is it possible to retrieve the value of Alternate user names of WTUser with API?

 

NavkuAnswer
14-Alexandrite
Jun 24, 2021 7:03 PM UTC

Using WRS Principal Domain, Retrieve the user's names and all details.

5 replies

16-Pearl
Oct 23, 2020 4:45 AM UTC

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

- Then no supported.

 

While if you just print a user, the attributes could include several UIDs, besides the one same as name, others are alternate names.

 

Cliff

Translate
Navku14-AlexandriteAuthor
14-Alexandrite
Oct 23, 2020 5:59 PM UTC

Hi ftian,

 

Thanks for the Reply,

 

Is there any use in providing alternate names for user?

Translate
16-Pearl
Oct 26, 2020 2:16 AM UTC

No really usage, just an alias of user's login name - user will have two logins and anyone can be used to login Windchill, while with same WTUser/ User Name.

 

- if look LDAP, you will find two UID attributes for the DN

 

Cliff

Translate
Navku14-AlexandriteAuthorAnswer
14-Alexandrite
Jun 24, 2021 7:03 PM UTC

Using WRS Principal Domain, Retrieve the user's names and all details.

Translate
12-Amethyst
Nov 7, 2025 1:12 PM UTC

Just in case someone else is searching for that here is how to do it using java API

wt.fc.ObjectIdentifier oid = wt.fc.ObjectIdentifier.newObjectIdentifier("wt.org.WTUser:123");
wt.org.WTUser theUser = (wt.org.WTUser) wt.fc.PersistenceHelper.manager.refresh(oid);
String alternateName = wt.org.OrganizationServicesHelper.getAlternateName(theUser, WTUser.ALT_USER_NAME_1);

Translate