Traceback (most recent call last):
File “env/lib/python3.10/site-packages/rauth/service.py”, line 21, in process_token_request
return tuple(data[key] for key in args)
File “env/lib/python3.10/site-packages/rauth/service.py”, line 21, in
return tuple(data[key] for key in args)
KeyError: ‘access_token’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 115, 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 51, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/handler.py”, line 84, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “apps/frappe/frappe/init.py”, line 1742, 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/oauth2_logins.py”, line 33, in login_via_office365
login_via_oauth2_id_token(“office_365”, code, state, decoder=decoder_compat)
File “apps/frappe/frappe/utils/oauth.py”, line 125, in login_via_oauth2_id_token
info = get_info_via_oauth(provider, code, decoder, id_token=True)
File “apps/frappe/frappe/utils/oauth.py”, line 146, in get_info_via_oauth
session = flow.get_auth_session(**args)
File “env/lib/python3.10/site-packages/rauth/service.py”, line 556, in get_auth_session
session = self.get_session(self.get_access_token(method, **kwargs))
File “env/lib/python3.10/site-packages/rauth/service.py”, line 542, in get_access_token
access_token, = process_token_request(r, decoder, key)
File “env/lib/python3.10/site-packages/rauth/service.py”, line 24, in process_token_request
raise KeyError(PROCESS_TOKEN_ERROR.format(key=bad_key, raw=r.content))
KeyError: ‘Decoder failed to handle access_token with data as returned by provider. A different decoder may be needed. Provider returned: b'{“error”:“interaction_required”,“error_description”:“AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access \'00000002-0000-0000-c000-000000000000\'. Trace ID: ab516470-f881-48ad-af12-d1d774bd8300 Correlation ID: 572df699-5c78-41d6-8bd0-18a70dc7d80c Timestamp: 2025-05-27 10:33:26Z”,“error_codes”:[50076],“timestamp”:“2025-05-27 10:33:26Z”,“trace_id”:“ab516470-f881-48ad-af12-d1d774bd8300”,“correlation_id”:“572df699-5c78-41d6-8bd0-18a70dc7d80c”,“error_uri”:“https://login.microsoftonline.com/error?code=50076",“suberror”:"basic_action”}'’