Hi @David Macháček
Microsoft identity platform returns an error if you attempt to use a spa redirect URI without an Origin
header. The error AADSTS9002327 usually occurs when you are not passing the Origin as a header the token request must include the Origin header to be processed correctly.
Also, check that you have added redirect URI that supports auth code flow with PKCE and cross-origin resource sharing (CORS).
Please read the relevant document to know about Redirect URIs for single-page apps (SPAs).
Hope this helps. Do let us know if you have any further queries by responding in the comments section.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.