Umbraco 16 - "invalid_request" error when logging into backoffice

I’m getting the following error when trying to access the Umbraco 16 backoffice:

error: invalid_request  
error_description: The specified 'redirect_uri' is not valid for this client application.  
error_uri: https://documentation.openiddict.com/errors/ID2043  

What could be causing this, and how can I fix it?
Thanks in advance.

You might have to specify the url for your application.
See this GitHub issue comment for more details:

I have been reading that BackOfficeHost under host should only be set when running backoffice and application on different domains.

I get the same problem when i run two different domains on the same database.

example:

https://somedomain.dk/umbraco

http://localhost:61872/umbraco

I cant find a fix on this issue :frowning:

Can someone help?

You can set it to your default domain without any issues that I’m aware of.

I usually set it to the same URL as UmbracoApplicationUrl.

I don’t know the root cause for why Umbraco sometimes get confused as to which host to allow.

However, I do know that setting both UmbracoApplicationUrland BackOfficeHostwill, in most cases, resolve the problem.

My guess is that some of the first requests sent to the Umbraco application, when it boots, is coming in on the wrong address.
Umbraco might then think that the initial call is the Host for the backoffice, which might not always be true.

There should be no harm in setting this value and you can safely remove it later if it does not work for you.

@alperenkapusuz58 See the following topic, it describes what’s happening: