Getting Started With Microsoft Graph API For Python Development (Set Up & Authentication)

preview_player
Показать описание
Until recently, I was able to finally figure out the workflow that I am satisfied with connecting to Microsoft Graph API to automate different Office applications. So in this tutorial, I will show you how to setup and connect to Microsoft Graph API in Python first, then I will cover how to automate different office web applications such as OneDrive, OneNote, Outlook, and other applications.

PS: this approach will work with both personal and work accounts.

► Reference:
-------------------------------------------------------------------------------------------

► Follow Up Videos:
---------------------------------------------------------------------------------------------------------------

► Buy Me a Coffee? Your support is much appreciated!
---------------------------------------------------------------------------------------------------------------
☕ Venmo: @Jie-Jenn

► Support my channel so I can continue making free contents
---------------------------------------------------------------------------------------------------------------

► Timestamp
00:00 - Microsoft Graph API Overview & Agenda
02:13 - Setting Up App (App registrations)
03:26 - Dive into the Python Script
08:17 - Install MSAL Python Package
08:53 - Authenticate with Authorization Code (Method 1)
21:05 - Authenticate By Log In (Method 2)

#GraphAPI #AzureCloud #Azure
Рекомендации по теме
Комментарии
Автор

You are a champion. This saved me from days of running around in circles. Thank you 👊

mindfulmindfull
Автор

Such a time saver. I should have watched this first before spending so much time. 😃

santhoshkumar
Автор

I want to have the script running in the background in an aws lambda, is there a way to eliminate the user having to log in?

alip
Автор

Thank you! This is so much clearer than Microsoft's own documentation.

evraamsdonk
Автор

I can't thank you enough for this. Been stuck putting so many hours trying to figure this out over the last week.
Even ChatGPT/GPT4 couldn't help me with this one.

Sent you some coffee money, first time I've ever done that for a YouTube vid but you deserve it.
Thank you again.

MartianMoon
Автор

Hello Jie Jenn, you are the master of the API integration haha.
Thanks for this amazing tutorials.

TheJFMR
Автор

is there a way to bypass the manual login process (where you entered the code in the prompt)?

mattchen
Автор

actually when i create the authentication to account and when i when the code for access token they give error :-->
Error Code:
Code..

Error Code 70000
Message Provided grant is invalid or malformed.
Remediation Developer error - the app is attempting to sign in without the necessary or correct authentication parameters.

ArjunRaj-hzbf
Автор

im trying to use this to gain access to my onenote pages so I can refine my notes using gpt-3 api

quanticdev
Автор

Thank you for this series of videos!
I am at enabling the scopes, but I can't find the options to permit OneDrive access. I am not sure if not enabling that would affect anything though, since it seems like you did successfully access to OneDrive in one of your later videos without worrying about the permission.

conniezi
Автор

Amazing tutorial, no way I could find this with MS docs. Plus they write (deprecated) on half the useful methods

OM-ynpt
Автор

bro i am stuck with the following error-
The code you entered has expired. Get a new code from the device you're trying to sign in to and try again. can you tell me how to figure this out i am able to put my outllook mail and pass word after that the error is showing "That Microsoft account doesn't exist. Enter a different account or"

Mohammad-oewj
Автор

For the 2nd method, if the code is in a python (say Flask) web app, how to get the device 'code' or where user can get the device code?

Also we rely on Microsoft Edge's company user profile (or the Windows Account extension in Chrome), so the authentication flow is transparent to my web app (I do not need to call msal.initiate_xxx_flow function to initiate authentication flow. How can I get the access_code or login user name?

thank you!

xizhenwang
Автор

ValueError: API does not accept frozenset({'offline_access', 'profile', 'openid'}) value as user-provided scopes

Anything on this? anyone?

cggtoxi
Автор

Can you help me to connect with Salesforce through VBA code for creating a case on Salesforce

prasenjitmandal
Автор

Hey, great video, helped me a lot (to make a code a little bit easier i get the token by username/password) and seems like everything works :)

I wonder if I can refresh the permissions of the app after the first web authentication. I added new permissions (such as One Note reads etc), but seems like it doesnt update and web authentication shows me that connection is refused (so I cant get to the site second timer)

TheVopek
Автор

Do we have some ways to avoid having to log in? eg. if we want to run this as a background job for example (in a Gitlab CI/Jenkins job for example)

paulamar
Автор

For a script running in the background, how can you eliminate the user having to log in

jethrobizumuremyi
Автор

Hello. What is the Azure Cloud Environment you switched to?

zarbose
Автор

Thanks !! my app is running on schedule basis so what will be the best way to get access token. we can't use here browser.. do we have anything like managed identity

DilipDiwakarAricent
welcome to shbcf.ru