Skip to content

Exception while requesting OAuth 2.0 credentials #349

@dabaer

Description

@dabaer

This is not a duplicate of #348, but I've been having trouble getting this to work with Microsoft 365:

Caught exception while requesting OAuth 2.0 credentials ...
TypeError("load_pem_x509_certificate() missing 1 required positional argument: 'backend'")

But after following solutions to the same issue in the Certipy repo I fixed that by upgrading cryptography to 3.5. Now I get a different error:

Caught exception while requesting OAuth 2.0 credentials...
ValueError('too many values to unpack (expected 2)')

I generated the certificate and key using the command suggested by #247 and I can't quite figure out why it's erroring. Searching online only returns very old and unrelated issues.

Could this be something to do with configuration on the Microsoft side? I have created an App in Entra, and assigned the needed scopes and my certificate to it.

Thanks!

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