Skip to main content
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
Jun 24, 2021 7:03 PM UTC

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

5 replies

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

NavkuAuthor
Oct 23, 2020 5:59 PM UTC

Hi ftian,

 

Thanks for the Reply,

 

Is there any use in providing alternate names for user?

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

NavkuAuthorAnswer
Jun 24, 2021 7:03 PM UTC

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

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);