I am trying to sync a on-premise AD users properties, i.e. full name, email, mobile phone, to an SharePoint online list, to create an employee directory. I have installed the Microsoft on-premise gateway on a local server and can see it on the O365 Flow gateway area.
what could I use to query the gateway to sync the data I am looking for to create the employee direct on a online SharePoint list?
The On-Premise Data Gateway does not currently support Active Directory data operations (documentation). However, nothing is stopping you from running a PowerShell script against your internal AD, that returns the results to a .CSV and/or .XLSX file that you could then use Flow and the Data Gateway to create/update a SharePoint List with (example script).
We do something similar, where we have a script running via a scheduled task (scheduled task documentation) set to run every night on the local server, then we use Flow to upload the outputed file from the completed scheduled task to a document library, then we have it update a SharePoint list from the file within the document Library:
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
I am afraid that we have no triggers or actions can get on-premise AD users during we use flow to supported in Microsoft Flow currently.
If you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:
Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for this info! I am a college student too and I have finals these next weeks so i havent gotten to your recommendation yet. I havent forgot though and greatly appreciate the advice.
Keep up to date with current events and community announcements in the Power Automate community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!