Hi @howard tseng
The audience of this token is SharePoint REST API instead of graph API, it cannot be used to call graph API. You should get access token with graph API as audience:
- Grant the
Files.ReadWrite.All
application permission to your app under the Microsoft Graph API. - Use the client credential flow to obtain an access token, you must change the
scope
to:https://graph.microsoft.com/.default
.
2.
3.
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.