1. Dawn Browneyes
  2. PowerBuilder
  3. Thursday, 21 July 2022 16:18 PM UTC

I want to query ACTIVE DIRECTORY for a particular user.


I am creating a login and I want to make sure they are in the active directory.


Can I get all the domains they are active in?  




John Fauss Accepted Answer Pending Moderation
  1. Thursday, 21 July 2022 20:32 PM UTC
  2. PowerBuilder
  3. # 1

Hi, Dawn -

You've asked a very general, wide-open type of question. Would you mind providing a little more context about what you want to do?

Are you creating a database login? network login? from a PB application? from a command prompt or PowerShell? Is this for you to use? A network/system/DB admin?

I'll be the first to admit that I can't even spell Active Directory (oh, wait, I guess I can...), but I'm reasonably sure that you can't create a login or query other domains without the proper rights/permissions. In this day and age, there are security-related implications for these types of actions.

Regards, John

  1. Dawn Browneyes
  2. Thursday, 21 July 2022 21:41 PM UTC
Hi, I want to call a function from within PB to check if a User has a valid user id in Active Directory.

If they do, I want to create a database login.

I use: advapi32.dll >> GetUserNameW to get the user id, while they are logging in.

But I want a function that can check if a user id exists before it creates their DB login.

  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 21 July 2022 22:01 PM UTC
Hi Dawn;

My STD Framework has all the AD interaction capabilities built in. Here is a presentation that I gave at a PB conference that explains how it works...



Regards... Chris
  1. Helpful
There are no comments made yet.
  • Page :
  • 1

There are no replies made for this question yet.
However, you are not allowed to reply to this question.