For Contact Center to be able to access the Azure application, you must ensure that permissions and administration consent has been granted.
...
email
IMAP AccessAsUser All
offline_access
Important: You must also MUST provide administration consent to Mail.ReadWrite so Contact Center can use the client secret.