Force ADFS Database Sync

This’ll be a quick one – I ran into an issue last night where my secondary ADFS servers were not updating their database settings from the primary, and hadn’t updated in over 10 days. This was causing problems, as I had made some changes to ADFS to configure Yammer SSO, and the correct claims rules weren’t being applied if users hit the wrong server.

I checked the Poll Duration in PowerShell, and found that it was set to the standard 300 seconds (5 minutes), and not some insanely long interval:

I tried changing to a shorter poll interval by using the following command:

Set-AdfsSyncProperties -PollDuration 10

This drops the poll duration down to 10 seconds, so you’d think that it would update pretty quickly. Sadly, if a server is already not syncing at 5 minute intervals, setting a shorter sync still doesn’t change anything.

After looking around the web, I couldn’t find any options to force a database sync either through PowerShell, or through the GUI. Thankfully, the resolution to the problem is actually quite simple – just restart the ADFS services, and this will force the database to resync immediately.

Since I was already in PowerShell, I restarted the service using the following command:

Restart-Service adfssrv

You can, of course, just restart the service through services.msc – but I like using PowerShell whenever I can, so there you go!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.