Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh command with tokens from single page applications error out with code 7000 #91

Open
madret opened this issue Nov 30, 2024 · 0 comments

Comments

@madret
Copy link

madret commented Nov 30, 2024

azurehound version v2.1.9

Refresh tokens from single page applications (like the azure portal) error out with error code AADSTS7000.
Command: azurehound -r "<refresh_token>" list --tenant "example.onmicrosoft.com" -o output.json

Tested the same command with a MSgraph refresh token and that did work.

I assume the issue lies in the fact that it needs the origin key in the header of the request.
MS documentation: https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow#redirect-uris-for-single-page-apps-spas

Perhaps something across the lines of (in the http.go, NewRequest function):
req.Header.Set("Origin", "example.com")

Curious to hear any thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant