I have a problem with regards to configuration on production environment. It turns out that user for User Profiles sync may not be given Replicate directory changes on root OU, which is needed for sync to work. Now, I need user profiles so the workflows can work. Is there a workaround here? I was thinking about some manual way of importing users, perhaps Powershell, saving data from AD into file and importing it again programmatically?
Workaround is to implement some custom functionality that does the import. It can be PowerShell, Windows Service, pretty much anything that can query AD and can access SharePoint via SharePoint Server Object Model.
Note that you need to handle addition, updating, and possibly also removal scenarios, and figure out what User Profile Fields in SharePoint to override using AD values in case user has manually updated those in MySite.
E.g., create user profile in SharePoint using Server Object Model in case you would use Windows Service: