M365 email and calendar sync fails

Hi, using 0.53 here! We are failing to sync emails and calendar data but everything seems to be configured correctly on both ends Attached on this message you can find our Azure config. The worker keeps sending us these lines :
worker-1 | CalendarEventImportException [Error]: Unknown error importing calendar events for calendar channel 22a91... in workspace b75a47b9-76e7-4ae9-96bb-35fb58891833: Access token is undefined or empty.
worker-1 | CalendarEventImportException [Error]: Unknown error importing calendar events for calendar channel 22a91... in workspace b75a47b9-76e7-4ae9-96bb-35fb58891833: Access token is undefined or empty.
We also get some 401's for emails on some users I attached the full worker logs as well The Microsoft config is the following in .env :
MESSAGING_PROVIDER_MICROSOFT_ENABLED=true
CALENDAR_PROVIDER_MICROSOFT_ENABLED=true
AUTH_MICROSOFT_ENABLED=true
AUTH_MICROSOFT_CLIENT_ID=clientid
AUTH_MICROSOFT_CLIENT_SECRET=clientsecret
AUTH_MICROSOFT_CALLBACK_URL=https://crm.nuabee.fr/auth/microsoft/redirect
AUTH_MICROSOFT_APIS_CALLBACK_URL=https://crm.nuabee.fr/auth/microsoft-apis/get-access-token
MESSAGING_PROVIDER_MICROSOFT_ENABLED=true
CALENDAR_PROVIDER_MICROSOFT_ENABLED=true
AUTH_MICROSOFT_ENABLED=true
AUTH_MICROSOFT_CLIENT_ID=clientid
AUTH_MICROSOFT_CLIENT_SECRET=clientsecret
AUTH_MICROSOFT_CALLBACK_URL=https://crm.nuabee.fr/auth/microsoft/redirect
AUTH_MICROSOFT_APIS_CALLBACK_URL=https://crm.nuabee.fr/auth/microsoft-apis/get-access-token
10 Replies
Guillaume
Guillaume2w ago
are you using accounts with valid M365 licence ?
BigBadVoodoo
BigBadVoodooOP2w ago
yes indeed !
DemonNo0zy
DemonNo0zy2w ago
We will double check about licence and try to update "premium" instead of "standard"
DemonNo0zy
DemonNo0zy2w ago
We've applied the premium license to the application owner. Is the premium license mandatory for all users, or just the owner? The pro version of twenty avoids the need for a premium license? It's already been 5 minutes and we can't see any log movement, is this normal ?
No description
Prastoin
Prastoin2w ago
We've applied the premium license to the application owner. Is the premium license mandatory for all users, or just the owner?
Unless I'm mistaken only for the imported account
The pro version of twenty avoids the need for a premium license?
Do you mean the cloud solution ? Yes you would still need to have a prenium microsoft account
It's already been 5 minutes and we can't see any log movement, is this normal ?
This can take a moment depending on the imported account data volume, please have a look to your worker logs
BigBadVoodoo
BigBadVoodooOP2w ago
The worker says it's fetching messages indeed but I don't see much network I/O on this system
Guillaume
Guillaume2w ago
To make sure the worker is working, you better open redis and check if the "messages queue" is processing your emails. That's the best way to know if the worker processes are good or if there is an issue. Also, it will be a good way to make sure all the cron jobs are registered
Guillaume
Guillaume2w ago
for instance on my screenshot, i see there are 13813 messages to import, it just takes hours, but it is processing every minutes 200 hundreds messages
No description
BigBadVoodoo
BigBadVoodooOP2w ago
I see a lot of failed on this explorer but I can't read redis :
BigBadVoodoo
BigBadVoodooOP2w ago
No description

Did you find this page helpful?