Azure delta sync scheduled task disabling users and sometimes deleting users on Moodle

Azure delta sync scheduled task disabling users and sometimes deleting users on Moodle

by Manoj Mohan -
Number of replies: 3

Dear all,

I found a weird thing on Moodle since couple of days I found users were disabled automatically. I found the azure delta sync was disabling the users automatically. Sometimes it is deleting the users also. Then I had to access the DB to restore the deleted users. It never happened before. Our Moodle version is 3.9,2.

Anybody have any clue about this issue? We are using OpenID connect for authentication. It would be great if somebody can give some advise about this.

Average of ratings: -
In reply to Manoj Mohan

Re: Azure delta sync scheduled task disabling users and sometimes deleting users on Moodle

by C Behan -
Hi Manoj,
I don't know about the particular problem i.e. why this is happening.
I wonder though if you need syncing to be taking place? Maybe it would meet your needs to just allow users to log in from your tenant? Any changes to matched fields get updated when the user logs in anyway. The only sync option I have on is to sync photos on login.
Catherine
In reply to C Behan

Re: Azure delta sync scheduled task disabling users and sometimes deleting users on Moodle

by Manoj Mohan -

Hi Behan,

Our scenario was the same before. But, may be after we update the Moodle to 3.9.2, all the azure users on O365 azure are appearing on Moodle without even login in for first time. This will help in course enrollment. AD sync task was running everyday 1.30AM. So, by default the next day some students were complaining that they are unable to login. Because the users were disabled.

We can disable the task. But very few users are getting an error while logging to Moodle " No token available for this user". To solve this issue I have to do a full AD sync again. So, now I cannot stop the task completely because of this issue. This is happening with  delta sync only. Full sync is ok.

I am copying the 'suspending' log below.

Execute scheduled task: Sync users with Azure AD. (local_o365\task\usersync)
... started 10:05:03. Current memory use 48.2MB.
...... 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.
...... Checking deleted users list...
......... Could not find user s201810001@mcm.ac.ae in Azure AD. Suspending user...
......... Could not find user s201810002@mcm.ac.ae in Azure AD. Suspending user...
......... Could not find user s201810003@mcm.ac.ae in Azure AD. Suspending user...
......... Could not find user s201720018@mcm.ac.ae in Azure AD.
Deleting log:
......... Could not find suspended user s201810002@mcm.ac.ae in Azure AD. Deleting user...
......... Could not find suspended user s201810003@mcm.ac.ae in Azure AD. Deleting user...
......... Could not find suspended user s201720018@mcm.ac.ae in Azure AD. Deleting user...
......... Could not find suspended user s201810009@mcm.ac.ae in Azure AD. Deleting user...
......... Could not find suspended user s201810010@mcm.ac.ae in Azure AD. Deleting user...
......... Could not find suspended user s201810014@mcm.ac.ae in Azure AD. Deleting user...
......... Could not find suspended user s201810015@mcm.ac.ae in Azure AD. Deleting user...
......... Could not find suspended user s201810011@mcm.ac.ae in Azure AD. Deleting user...
...... Sync process finished.