San Kay
San Kay

Reputation: 91

How to completely automate oauth2 code/token generation in for Microsoft Graph?

I'm trying to access Microsft Graph APIs and I need to automate the process of oauth. I do not want to have a web app in order to sign on microsoft login page to obtain code and token. Is there a way to acheive this in backend where I can login from the python script itself ?

I've tried this resource- https://github.com/microsoftgraph/python-sample-auth but here the login to microsoft is done on the UI

Upvotes: 0

Views: 882

Answers (1)

Tomer
Tomer

Reputation: 1646

It may be possible (to a degree) depending on your use case.

It's described here: https://learn.microsoft.com/en-us/graph/auth-v2-service

Step 3 may be done in Azure portal when creating the application.

The above will allow you to create oauth tokens programmatically (once step 3 is done).

Upvotes: 1

Related Questions