Office 365 Invalid state

Hi Folks,

After configuring the office 365 which was a nightmare to configure, Now when I’m trying to configure the user mailbox for the helpdesk after I log into the microsoft when the callback returns back I have this error:

Invalid state.

Server Error

Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 110, in application
response = frappe.api.handle(request)
File “apps/frappe/frappe/api/init.py”, line 49, in handle
data = endpoint(**arguments)
File “apps/frappe/frappe/api/v1.py”, line 36, in handle_rpc_call
return frappe.handler.handle()
File “apps/frappe/frappe/handler.py”, line 49, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/handler.py”, line 85, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “apps/frappe/frappe/init.py”, line 1689, in call
return fn(*args, **newargs)
File “apps/frappe/frappe/utils/typing_validations.py”, line 31, in wrapper
return func(*args, **kwargs)
File “apps/frappe/frappe/integrations/doctype/connected_app/connected_app.py”, line 169, in callback
frappe.throw(_(“Invalid state.”))
File “apps/frappe/frappe/init.py”, line 577, in throw
msgprint(
File “apps/frappe/frappe/init.py”, line 549, in msgprint
_raise_exception()
File “apps/frappe/frappe/init.py”, line 500, in _raise_exception
raise exc
frappe.exceptions.ValidationError: Invalid state.

Is there a way to track this?