microsoft / o365-moodle

Office 365 and Azure Active Directory plugins for Moodle
GNU General Public License v3.0
180 stars 137 forks source link

Sync users with Azure AD and Create user groups in Microsoft 365 Fail when run from scheduled task #1970

Open ShameerIbrict opened 2 years ago

ShameerIbrict commented 2 years ago

Hi, After the successful integration of Microsoft 365 Integration, when we run " Sync users with Azure AD" from scheduled task its fail and gives message as follows " Execute scheduled task: Sync users with Azure AD (local_o365\task\usersync) ... started 17:00:05. Current memory use 12.9MB. ...... Starting sync " also the same problem with Create user groups in Microsoft 365 the message is as follows " Execute scheduled task: Create user groups in Microsoft 365 (local_o365\task\groupcreate) ... started 13:03:15. Current memory use 12.9MB."

Microsoft 365 Integration Version 3.11.2 ( 2021051711 ) Moodle Version : 3.11.5 (Build: 20220117)

Note: The last successful run of the this scheduled task was on 25 October 2021

usersync when i check Task running now , its seems those process is not terminating.. taskrunningNow

weilai-irl commented 2 years ago

Hi @ShameerIbrict,

Could you turn debugging on and see it gives more details of what happens behind the scene please. Could you also try verify the integration setup by clicking the "update" button in the "Verify setup" section of the local_o365 plugin configuration page please. Feel free to attach a screenshot if possible.

Regards, Lai

ShameerIbrict commented 2 years ago

Hi @ShameerIbrict,

Could you turn debugging on and see it gives more details of what happens behind the scene please. Could you also try verify the integration setup by clicking the "update" button in the "Verify setup" section of the local_o365 plugin configuration page please. Feel free to attach a screenshot if possible.

Regards, Lai

Dear Lai
Thank You for your Response I turned on debugging but its not showing any other errors or warnings. when I resynchronize previously synchronized courses are resyncing and getting notification message in Ms teams as Added in to teams. But new courses are not. New courses are enabled in Teams Customization page.

setuppage moodleapp Healthcheck

weilai-irl commented 2 years ago

Hi @ShameerIbrict,

The screenshots suggest no obvious issues in the configuration.

The last screenshot in your original reporting suggests that three tasks from the local_o365 plugin - SDS sync, user sync, and course sync - have all running for some time. This is quite unusual - normally they should run and either finish (after some time if your tenant has a lot of data), or fail. Could you try the following please:

In particular, after the "Starting sync" message in the output of the user sync task, there should be some more messages about the type of sync (full or delta) immediately after it, so I'm quite surprised that they don't present in your screenshot. Please try to investigate why.

Regards, Lai

ShameerIbrict commented 2 years ago

Hi @ShameerIbrict,

Thank you Dear Lai Yeah Tats the problem.. Actually every thing was perfect until oct 2021.. all of sudden this problem arise. debugging is turned on but its not giving any error. Thanks once again, I will investigate further in server level.

smangancap commented 3 months ago

Hello! I know this post is 2 years old but I am having exact same problem and hoping you can share what you learned :)

I have a feeling it has something to do with the size of the o365 groups and our moodle server hiccupping on that ...no useful debugging other than "cannot obtain task lock"

TIA!!