Office 365 Users Don't All Sync

Office 365 Users Don't All Sync

by Bryce Holland -
Number of replies: 1

I have setup the Office 365 authentication in my Moodle 3.7 instance. In order to better manage the users, I setup the sync settings to only sync accounts of users who were in the MoodleUsers group in Azure. There are currently 266 users in that group. However, only 166 have been synced. Manually running the Sync users with Azure AD Scheduled Task produces the following:

Execute scheduled task: Sync users with Azure AD. (local_o365\task\usersync)
...... Starting sync
...... No skiptoken (delta) stored.
...... Using deltatoken.
...... Using delta sync.
...... Contacting Azure AD...
...... Got response from Azure AD
...... Storing deltatoken
...... Clearing skiptoken (delta) (none received)
...... No users received to sync.
...... Sync process finished.
... used 4 dbqueries
... used 0.43125987052917 seconds
Scheduled task complete: Sync users with Azure AD. (local_o365\task\usersync)
I don't know why it is saying there are no users received to sync, when there are 100 more waiting.

Any clues on where to look?

Average of ratings: -
In reply to Bryce Holland

Re: Office 365 Users Don't All Sync

by Bryce Holland -
I was able to resolve this by checking the option in the sync settings to "Perform a full sync each run". I then manually ran the Azure sync task many times until it was finished syncing the users who were in that AD group. Finally, I unchecked the full sync option.
A couple days later I had a few new student accounts to sync. That completed fine without having to check the full sync option again.

image of full sync in settings