Unanswered: Filemaker Server 5.5 and Active Directory
Does anyone have a detailed set of instructions for how to actually use data from an active directory within filemaker? I want to create a value list of usernames from the domain. This should be relatively straight forward, yes?
I don't think its very straight forward. While access to an FM server can be restricted using LDAP/active directory, FMP does not provide a scriptable means to communicate with LDAP. If somebody has written an ODBC driver that communicate with LDAP, then you could send sql commands to the ODBC driver, which would convert them to LDAP.
However, it is possible, using PHP, to get data from Active Directory into FileMaker. You'd have to write a PHP page that would retrieve the data from Active Directory and then return the data to FileMaker. I can think of two ways this can be done:
1) Use the "import records" script step (must be a script step) to import data from PHP. Click "specify" to specify the file, and then under "specify xml data source" choose field. Specify a field that will dynamically create an http request to pass to the PHP page. Something like http://myserver.com/ldap_import.php?users=new . Then in your PHP page, write a script that will retrieve the appropriate data from LDAP, using PHP's LDAP functions. Then, print or echo out the data from PHP, making sure that your output adheres to one of FileMaker's XML grammars (fmp_xml or dsl_xml). Then, run your PHP script from a regular browser, to generate a sample xml output page. Save the XML to your hard drive. Then, import the xml file into FileMaker - this is where you can map the fields from the xml file to the FileMaker fields. Once you've done this, update the import order in the script. Now, you can run your FileMaker script, which will trigger the PHP script, which will get the LDAP data and return it to FileMaker, which will import that data from PHP into the FileMaker fields.
2) Set up a computer with FileMaker web companion. Set up a computer (could be the same one) with PHP. Write a PHP script that is triggered on a regular basis by a scheduled task. Your PHP script will write the data directly to FileMaker, using the PHP FX class (www.iviking.org). Now your FileMaker database is sync'd with Active Directory at whatever interval you desire.
Of course, you could replace PHP with any other web scripting language. Hope this helps.
BTW, *please* do post back if you find a better/simpler way. I'd really like to know.
Last edited by marianopeterson; 09-15-03 at 01:12.
I am using filemaker server, which has the ability to connect directly to Active Directory. I just have no clue how to use it, or even how to test it to see if its even set up right. Does anyone know about this feature? Thanks for all the other solutions. They might end up being easier than this one.
The Active Directory feature in FM Server is very simple (and limited). All it does is prevent users who are not authenticated on the domain from seeing the FileMaker files. So, if I plug my laptop into your network but don't log on to your domain, then when I click "Hosts" in the the open file dialog I won't see any of the hosted files on your FM Server. However, if you haven't enabled that option, then I will see the list of hosted files and will be able to try and open them. That is the only function that FM Server provides with regard to Active Directory.
If you want to retrieve data from Active Directory (you mentioned you wanted to get a list of users), then FM Server absolutely cannot do that, and you'd have to use FM Pro to retrieve the data somehow, probably using one of the methods mentioned in this thread.
But FM Server itself cannot communicate with Active Directory other than to verify that the current Windows User has been authenticated on the Windows Domain and is therefore authorized to view a list of hosted files on the FM Server.