jloo Absent Member.
Absent Member.
9417 views

Get Logged In user's current information from AD or LDAP from an AppScript.


Using an AppScript, how can I query my LDAP server based on the current user's logged in credentials?
0 Likes
5 Replies
Not applicable

Re: Get Logged In user's current information from AD or LDAP from an AppScript.


I don't have any code examples but I am aware of url type LDAP query.. you will need the proper dn= depending on your LDAP setup you may also need to bind first before you can query typically called the bind user or bind authentication - hopefully you setup your SBM users login id to be the same as in LDAP and if so you'll query using LDAP samaccountname=(sbm current user)

What are you trying to do? SBM already has capability to query and sync LDAP built in?
0 Likes
jloo Absent Member.
Absent Member.

Re: Get Logged In user's current information from AD or LDAP from an AppScript.


Ok. Well, I'm EXTREMELY new to Serena. Basically, I need to be able to display the selected user's employee ID number (in LDAP) on a form.

I have a drop down list that is populated with users in it. When the user selects a user from the drop down list, I need to be able to retrieve the selected user's employee ID.

If you can point me in the right direction, that would be great! I'm a sr. software engineer, Serena is just a new tool for me.
0 Likes
Not applicable

Re: Get Logged In user's current information from AD or LDAP from an AppScript.


I would search this forum for appscript and current user I don't recall seeing much about searching LDAP in this forum but a search wouldn't hurt. Yo'll probably get more info on google via LDAP query. A good tool to start with to get more familiar with LDAP would be ldp - free and part of MS admin pack.

Although I'm sure it's possible I'm not even sure where to begin on telling you how to query out of appscript against an outside product passing a variable from SBM. You might want to dig into importing your users from LDAP as this would give you authentication via LDAP instead of SBM - local for users not in LDAP and it may provide a mapping capability with the ID you seek to retrieve anyway. I'd like to use LDAP myself but because of corporate red tape I'm not allowed to 😞
0 Likes
jloo Absent Member.
Absent Member.

Re: Get Logged In user's current information from AD or LDAP from an AppScript.


Thanks Mike.

I did a search before I posted and I didn't have any luck.

I'm familiar with querying LDAP in C#, but not in vbscript and especially not in vbscript for SBM.

In any case, I might just go ahead and do the import thing. That sounds like a good idea. Thanks!
0 Likes
pmthompson1954 Absent Member.
Absent Member.

Re: Get Logged In user's current information from AD or LDAP from an AppScript.


Use the Contacts (TS_CONTACTS) table. Add fields to that table (it's in the Global Process) for the extra data you want for each user. Use the LDAP tools to map LDAP fields to Contacts fields then resync from LDAP.

You can then display this data using a sub-relational field to a Contact and the inherent relationship between Users and Contacts.

This assumes that your system has valid Users and Contacts imported from LDAP. Understandably, this is a lot to digest.... Good luck. (Shameless plug) Consider using Serena Professional Services or Services-on-Demand.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.