Microsoft Authentication Library (MSAL) for Python makes it easy to authenticate to Microsoft Entra ID. General docs are available here https://learn.microsoft.com/entra/msal/python/ Stable APIs are documented here https://msal-python.readthedocs.io. Questions can be asked on www.stackoverflow.com with tag "msal" + "python".
Login authentication has already succeeded and ACCESS_TOKEN is already in hand.
(Authentication is passed via Amazon Cognito with AzureAD authentication)
I am expecting to pass ACCESS_TOKEN to msal and issue another TOKEN.
I would like to know which function to use.
(If I had username and password on hand, I would call acquire_token_by_username_password, but since I have TOKEN on hand, I am assuming this part will be replaced.)
Your knowing that you would need an on-behalf-of flow (OBO) flow is already half way there. Go search that term in MSAL Python's API documentation and you will find the method to call.
I'd like to access OneDrive on behalf of a user. https://learn.microsoft.com/en-us/graph/auth-v2-user
Login authentication has already succeeded and ACCESS_TOKEN is already in hand. (Authentication is passed via Amazon Cognito with AzureAD authentication)
I am expecting to pass ACCESS_TOKEN to msal and issue another TOKEN. I would like to know which function to use.
(If I had username and password on hand, I would call acquire_token_by_username_password, but since I have TOKEN on hand, I am assuming this part will be replaced.)