According to the documentation, the endpoint does not support the use of client credential flow, after testing, although the request can be successful, but will not return any data, please use auth code flow, the request path is as follows:
GET https://graph.microsoft.com/v1.0/me/drive/sharedWithMe
After testing the request worked very well, here are the results of my tests in Graph Explorer:
See this link for more details:
https://learn.microsoft.com/en-us/graph/api/drive-sharedwithme?view=graph-rest-1.0&tabs=http
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.