Description
We have an App Registration on Azure which used the 'Mobile and desktop applications' platform authentication. Getting a new token using the authorization code flows works as expected. But when a refresh of the token is needed, it fails with the following error
AADSTS9002326: Cross-origin token redemption is permitted only for the 'Single-Page Application' client-type. Request origin: 'http://localhost:8020'.
I think this is caused by the fact that the header is always set. Also for non-spa app registrations.
When getting a new token from scratch, a try/except strategy is used to make it work for both spa and non-spa platform. I think this would work here as well and also be more consistent.
Reproduction
I use dbt-databricks in which I encountered this error. Therefor, I do not have any stand alone code.
Expected behavior
Be able to refresh token for both SPA and 'Mobile and desktop applications' platforms.
Is it a regression?
I don't think so.
Debug Logs
N.A.
Other Information
OS: Windows
Version: 11 enterprise
Additional context
I will try to solve and test this and create a PR linking to this issue.
Description We have an App Registration on Azure which used the 'Mobile and desktop applications' platform authentication. Getting a new token using the authorization code flows works as expected. But when a refresh of the token is needed, it fails with the following error
I think this is caused by the fact that the header is always set. Also for non-spa app registrations.
When getting a new token from scratch, a try/except strategy is used to make it work for both spa and non-spa platform. I think this would work here as well and also be more consistent.
Reproduction I use dbt-databricks in which I encountered this error. Therefor, I do not have any stand alone code.
Expected behavior Be able to refresh token for both SPA and 'Mobile and desktop applications' platforms.
Is it a regression? I don't think so.
Debug Logs N.A.
Other Information
Additional context I will try to solve and test this and create a PR linking to this issue.