mibuso.com

Microsoft Business Solutions online community
It is currently Sun May 19, 2013 11:00 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Access Active Directory Users by Code
PostPosted: Tue Feb 07, 2012 8:51 am 
Offline

Joined: Sat Nov 03, 2007 9:13 am
Posts: 93
Location: India
Country: India (in)
Dear NAV experts,

I want all Active Directory users in one form run time basis. I already read active directory related posts.
User SID or SID - Account ID virtual table also doesn't have required data. Windows Login table also contains list of only users which are added in NAV.

I want screen similar to "Windows Users & Groups" which is accessible from Tools->Security->Windows Login and Lookup in ID column.

Any ideas?

Mahesh Jain


Top
 Profile  
 
 Post subject: Re: Access Active Directory Users by Code
PostPosted: Tue Feb 07, 2012 9:19 pm 
Offline

Joined: Sat Jan 28, 2012 4:48 pm
Posts: 56
Country: Netherlands (nl)
Maybe you need Windows Object? Record 2000000050


Top
 Profile  
 
 Post subject: Re: Access Active Directory Users by Code
PostPosted: Tue Feb 07, 2012 10:08 pm 
Offline
Site Admin
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Sun Nov 07, 1999 8:01 am
Posts: 3288
Location: Wilrijk
Country: Belgium (be)
If your database is on SQL, you could create a linked server ADSI (Active Directory Service Interface) on SQL Server. Then you can query Active Directory through a SELECT statement. In NAV, you can use ADO to execute SQL statements from C/SIDE.

I don't have any ready-made code available. Search the web for "adsi linked server sql". Search mibuso.com forum for "ado sql".

_________________
No support using PM or e-mail - Please use this forum.
Search is your friend || Mark your Topic as SOLVED (= green checkmark) when your question is answered || Read the Forum Rules before making a posting

»»» Mark your calendar: NAV TechDays 2013 - 7 & 8 November 2013 ««« Visit the conference website: www.navtechdays.com


Top
 Profile  
 
 Post subject: Re: Access Active Directory Users by Code
PostPosted: Thu Feb 09, 2012 3:26 pm 
Offline

Joined: Sat Nov 03, 2007 9:13 am
Posts: 93
Location: India
Country: India (in)
Thanks Bernad & Luc Van Dyck for perfect reply.
I tried Barnad's solution by using "Windows Object" virtual table. This is what i needed..! I could access all Active Directory users in one form & use for futher processing.

Sad news is that It is not working in RTC.
I get error - "Internal error 12 in module 40. Contact your system administrator or partner."

I also wrote a code to transfer these records in another physical table of NAV & tried to display but System gives error when accessing "Windows Object" table itself. Any idea.. :idea:

_________________
Best Regards,
Mahesh Jain
mahesh@reliconservices.com


Top
 Profile  
 
 Post subject: Re: Access Active Directory Users by Code
PostPosted: Fri Feb 10, 2012 10:45 am 
Offline

Joined: Sat Jan 28, 2012 4:48 pm
Posts: 56
Country: Netherlands (nl)
Sorry, only know about Nav5.
But maybe it's something to do with the PC where NAV is running? (whether it's client or not)
See http://msdn.microsoft.com/en-us/library/dd301309.aspx


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: