Hi @SCT-Akouodev ,
By default, sharedWithMe return items shared within your own tenant. To include items shared from external tenants, append ?allowexternal=true to the GET request.
Looking at your question you seem to use wrong parameter in your API call /sharedWithMe?external=true, please find the correct parameter /sharedWithMe?allowexternal=true.
Also, make sure in the request payload of /invite API, use "requireSignIn": true so the file appears in OneDrive shared files.
POST /drive/items/{itemId}/invite
{
"requireSignIn": true,
"sendInvitation": true,
"roles": [ "read" ],
"recipients": [
{
"email": "string"
}
],
"message": "string"
}
For more information please refer these documentations.
driveitem-invite
drive-sharedwithme
Hope this helps you.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".