Skip to content

authenticating via postman seems impossible #49

@benoitmiserez

Description

@benoitmiserez

Hello, thanks for the amazing repo.

I can successfully authenticate via the swagger docs as explained in the readme, but I am having trouble authenticating via postman (and other approaches that only use the API). After successfully using the browser to sign in, the /token endpoint is returning 401 Unauthorized.

I traced it back to line 31 in fastapi_msal/security/msal_auth_code_handler.py in MSALAuthCodeHandler().authorize_access_token(), where an auth_code seems to be retrieved from the session.

auth_code: Optional[AuthCode] = await AuthCode.load_from_session(session=SessionManager(request=request))

This does not seem to work via postman. Is this intended/expected behavior? How can I best solve this?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions