Try ERPNext Buy Support Partners Foundation

Social Login Office 365 AADSTS50011

I follow the instructions on
but I have a problem erro on return URL
“AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: …”

I have check the same URL URI return

I do not know how to resolve this problem.

Any one can help me?

We are encountering the same issue.

1 Like

I check and the URI on azure was wrong. I fix and now I have thi error

Server Error
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 60, in application
response = frappe.api.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 55, in handle
return frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 22, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 61, in execute_cmd
return, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 1042, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/integrations/”, line 28, in login_via_office365
login_via_oauth2_id_token(“office_365”, code, state, decoder=decoder_compat)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 116, in login_via_oauth2_id_token
info = get_info_via_oauth(provider, code, decoder, id_token=True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 148, in get_info_via_oauth
frappe.throw(_(“Email not verified with {0}”).format(provider.title()))
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 364, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 350, in msgprint
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 316, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError: E-mail não verificado com Office_365

how can I resolve this?

Hi @Rodrigo_Rafael,

We manage to fix it by going in Azure-> App Registration->Token Configuration and choose Add optional claim and select email for all 3 Access, Token, SAML might work with just one but have not tested


1 Like

Ok, thankyou!!
It is working now!!

But how can I configure the default user permitions for new users with social login?

Update field, “Default Role at Time of Signup” on “Portal Settings” Page