Best Triggre Community!
We have build an application where businesses can manage their on-boarding/off-boarding of personnel.
Through the application they can create i.e. an on-boarding request, after which their IT Partner is notified so that he can create the new employee within the AD and provide the required licences.
When a new IT Partner starts using our application, he first has to transfer all the existing data from the Active Directory into the application so that it is aligned. As you can imagine this can be a pain in the ass, since some companies have hundreds of employees. For each employee it has to enter it’s general data and all licences etc etc.
We are now thinking about setting up a connection with Active Directories so that we can retrieve that data (Only READ not WRITE), but it seems really hard to do this. We do not want to use it as SSO, but we just want the data of all the users in our system so that they can make adjustments to that where needed. Has any one done something like this before? If so, please let me know where to start!
No customer I know of has built this, and I cannot find a no-code solution to it. But I might be able to provide a usable solution. It requires using some PowerShell on the customer site (since the Active Directory will likely be behind a strict firewall and/or other security measures).
Assuming you’ll be able to find someone at the company who can do this, perhaps you can yourself, or you can find the necessary documentation online, it would probably look something like the script that Mike Kanakos created in this post: PowerShell script to display information about Active Directory users | 4sysops
Then, when the script retrieves this info, you can call a REST API from PowerShell, as documented in this article by Microsoft about PowerShell: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-restmethod?view=powershell-5.1&redirectedfrom=MSDN
With this you should be able to get a Zapier webhook to work and from there, you should be back on known territory As a quick reminder, we answered a question about webhooks in Zapier in this thread: https://triggre.com/forums/topic/rest-api-connection/
Then it simply seems a matter of running this script daily for example, which is also something that is possible to do in PowerShell.
Hope this provides a good solution, even though not a completely no-code one!
Thanks for you reply! I already looked at that solution indeed, but as far as i know it is not possible to call Powershell through an API Request on a regular basis. E.G. If i create an automation flow which should run every night to retrieve the AD Accounts i cannot make a request to Powershell. With Powershell you can only make API Calls to another endpoint.
Or is this wrong? If so, please let me know!
My suggestion is to do it the other way around. Have the PowerShell script run on a scheduled interval (e.g. daily), sending information to Triggre (via the Zapier Webhook).
This article describes a fairly simple method to setup a PowerShell script that runs periodically: https://o365reports.com/2019/08/02/schedule-powershell-script-task-scheduler/
I think this solution can work and it is a very robust solution too in my opinion.
Good luck! Let me know if we can help further!