Active Directory List of Users

Trevor Daniel

I have been asked to write a small utility to copy users from an AD to another system.

I found this posting which looks perfect to get me going...

How can I get a list of users from active directory?

As I don't have an AD to work with, I went to my Azure portal and created one on there to test against...

Then, it looked like all I needed to do was insert my domain in this line....

using (var context = new PrincipalContext(ContextType.Domain, "yourdomain.com"))

My domain, as supplied by Azure is xxxx.onmicrosoft.com

but when I run the code, I keep getting

An unhandled exception of type 'System.DirectoryServices.AccountManagement.PrincipalServerDownException' occurred in System.DirectoryServices.AccountManagement.dll

Additional information: The server could not be contacted.

Can anyone see what I am missing please?

Trevor Daniel

i borrowed my mates old server and built a local server 2012 and joined the domain.

probably not everyone's answer. but worked for me.

(if i had more time i would have liked to get the azure domain working... im sure i built it right. just didn't work.

so that's my answer.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Active Directory Users homespace

From Dev

Add users to Active Directory

From Dev

Get list of Active Directory users with authenticated identity thru Waffle (Java)?

From Dev

How to export a full list of users in Samba Active Directory?

From Dev

Get a list of users who are not part of ANY group in the active directory

From Dev

Determine If Users Are In Active Directory With PowerShell

From Dev

Setting flags for users (Active Directory)

From Dev

Missing users in Centrify active directory

From Dev

Determine If Users Are In Active Directory With PowerShell

From Dev

Disable Active Directory Inactive Users

From Dev

Samba use Active Directory users

From Dev

Using LDAP to find Users in Active Directory - no Users?

From Java

Are Active Directory Users and Computers permissions different then Active Directory Administrative Center?

From Dev

Active Directory Powershell - forest-wide search script using .csv list of users

From Dev

Output list of all Active Directory users and all groups each user is a member of

From Dev

Load list of Users in two Azure Active Directory Groups using Graph API

From Dev

active directory users on asp.net

From Dev

How to retrieve all users of Active Directory?

From Dev

Validate users of Remote Active Directory in C#

From Dev

Read deleted users from Active directory

From Dev

Azure Active Directory Assigned Users Ignored

From Dev

Autocomplete Text Box With Active Directory Users

From Dev

Add users to active directory using LDIFDE

From Dev

Tools to manage Windows Azure Active Directory users

From Dev

SQL with Active Directory and nested groups/users

From Dev

Remote access users with passwords with active directory

From Dev

Active Directory - Get All Users Belonging to a Manager

From Dev

Csv Export Script for Active Directory Users

From Dev

Active Directory: Allow users of different domain to login

Related Related

  1. 1

    Active Directory Users homespace

  2. 2

    Add users to Active Directory

  3. 3

    Get list of Active Directory users with authenticated identity thru Waffle (Java)?

  4. 4

    How to export a full list of users in Samba Active Directory?

  5. 5

    Get a list of users who are not part of ANY group in the active directory

  6. 6

    Determine If Users Are In Active Directory With PowerShell

  7. 7

    Setting flags for users (Active Directory)

  8. 8

    Missing users in Centrify active directory

  9. 9

    Determine If Users Are In Active Directory With PowerShell

  10. 10

    Disable Active Directory Inactive Users

  11. 11

    Samba use Active Directory users

  12. 12

    Using LDAP to find Users in Active Directory - no Users?

  13. 13

    Are Active Directory Users and Computers permissions different then Active Directory Administrative Center?

  14. 14

    Active Directory Powershell - forest-wide search script using .csv list of users

  15. 15

    Output list of all Active Directory users and all groups each user is a member of

  16. 16

    Load list of Users in two Azure Active Directory Groups using Graph API

  17. 17

    active directory users on asp.net

  18. 18

    How to retrieve all users of Active Directory?

  19. 19

    Validate users of Remote Active Directory in C#

  20. 20

    Read deleted users from Active directory

  21. 21

    Azure Active Directory Assigned Users Ignored

  22. 22

    Autocomplete Text Box With Active Directory Users

  23. 23

    Add users to active directory using LDIFDE

  24. 24

    Tools to manage Windows Azure Active Directory users

  25. 25

    SQL with Active Directory and nested groups/users

  26. 26

    Remote access users with passwords with active directory

  27. 27

    Active Directory - Get All Users Belonging to a Manager

  28. 28

    Csv Export Script for Active Directory Users

  29. 29

    Active Directory: Allow users of different domain to login

HotTag

Archive