Issue downloading onedrive shared files to my gmail account using api
I’ve working on a process where files are auto downloaded on server from gmail account and processed further. previously i was working with google drive attachments. Added a feature to download the attachments from onedrive as well. The files are received from company account of outlook. I’ve been stuck on this for a week now. I can’t download files through the onedrive link that’s recieved on my gmail. I’ve never worked with azure and MS graph APIs. Might be doing something wrong here. I tried from this link AccessSharedItems but it didn’t work. Got an error for “InvalidAudience”. Any help how can i do that or am i doing anything wrong here. I’m using client_credentials for authentication.
Here’s my code for authentication and to get item by the encodedUrl.