apexnationzI got the same error:
A01 OK AUTHENTICATE completed.
Getting mailbox folder list as authentication was successfull.
VERBOSE: Executing command -- A01 LIST "" *
A01 BAD User is authenticated but not connected.
Causing Error: IMAP protcol access to mailbox is disabled or permission not granted for client credential flow. Please enable IMAP protcol access or grant fullaccess to service principal.
I am struggling with the same problem for the last hours. The problem appeared on some Thunderbird clients (including mine), so I tried setting up a custom App in Azure using this guide, getting the above error in my machine.
It seems that in my case, Microsoft is using a kind of connection throttle per IP address. I tried on the same machine using a VPN and i connected succesfully:
A01 OK AUTHENTICATE completed.
Getting mailbox folder list as authentication was successfull.
VERBOSE: Executing command -- A01 LIST "" *
* LIST (\HasNoChildren) "/" Archive
* LIST (\Marked \HasChildren) "/" Calendar