79432266

Date: 2025-02-12 07:37:30
Score: 1.5
Natty:
Report link

I found a solution, involving User 2 is Given permission to the File by

Invite

https://graph.microsoft.com/v1.0/me/drive/items/<itemid>/invite
Body:JSON
{
  "recipients": [
    {
      "email": "Mail Of User 2"
    }
  ],
  "message": "Here's the file that we're collaborating on.",
  "requireSignIn": true,
  "sendInvitation": false,
  "roles": [ "write" ]
}

With this, User2 can download the file at any time without worrying about expiration. using
GET /shares/{shareIdOrEncodedSharingUrl}/driveItem/content https://graph.microsoft.com/v1.0/shares/{shareid}/driveItem/content
this will download the file as user 2 was given permission to the file

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): User2
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Anzil