I am trying to understand how the request to the Graph API works from Azure Functions.
From the App Service of my Azure Functions, I generated the Active Directoy App, and from there, I add in the "API Permissions" to be able to do requests to the Graph API.
My doubts are the following:
1- When I access the endpoint of my AAD App (____.azurewebsites.net/.auth/me), could I use the access token that it returns to make the request to the Graph API? I have done some testing but it returns the following error: CompactToken parsing failed with error code: 80049217
2- I have also tried to make a request to the endpoint: https://login.microsoftonline.com/[TENANT-ID]/oauth2/v2.0/token so that it should return an access token to make the request to the API of Graph. But I am getting the next error: The request body must contain the following parameter: 'grant_type'
To do this tries, I am using Postman/Insomnia. But I am not very sure how to continue trying.
Thanks beforehand