Skip to content

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

@madret

Description

@madret

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions