How to create a folder which is auto deleted after one week and is password protected?

Abid Hussain 46 Reputation points
2023-01-16T09:20:00.6666667+00:00

Hi all,

I have a C# Application and like to achieve the following:

  • Create a folder which is automatically deleted after a certain timespan (e.g. one week)
  • Make this folder password protected.

My intention is to provide limited access to certain files by external users.

I wonder if this is possible to achieve via Graph API?

Regards :-)

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft 365 and Office | OneDrive | For business | Windows
Microsoft Security | Microsoft Graph
Developer technologies | C#
0 comments No comments
{count} votes

Accepted answer
  1. Srinivasa Rao Darna 6,761 Reputation points Microsoft External Staff
    2023-01-16T12:59:58.4966667+00:00

    Hello Abid Hussain,

    With Microsoft Graph createLink you can create sharable link with password and ExpirationDateTime, and external users can no longer access the file/folder using sharable link after expiration date, but the file/folder will not be deleted from source.

    Hope this helps.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Abid Hussain 46 Reputation points
    2023-01-16T09:33:25.7+00:00

    Follow Up: I found how to share a folder and protect the share with a password:

    But still I wonder if it's possible to let the folder be automatically deleted after certain timespan ...?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.