DEV Community

Jaime López
Jaime López

Posted on • Originally published at intranetfromthetrenches.substack.com

Understanding and Managing the Recycle Bin in SharePoint Embedded

Welcome back to our series on the recycle bin feature in Microsoft 365! This is the fourth installment, and today we'll be diving into SharePoint Embedded.

A funny recycle bin full of files by Jaime López with Designer

If you've been following along, you've already learned about the recycle bin from an end user's perspective, explored nine essential facts for everyone from end-users to administrators, and grasped the importance of recycle bin management for site owners and admins:

For those who might be new to SharePoint Embedded, it's essentially a cloud-based document management service within Microsoft 365. Think of it as an API-only service that lets you manage files and documents throughout Microsoft 365. If you'd like to delve deeper into this service, check out my previous article, Getting to know SharePoint Embedded, or this explanatory video Introduction to SharePoint Embedded.

The recycle bin is a powerful yet straightforward concept. In a document management service, it provides a crucial safety net, and that's exactly what we'll be exploring in this article. We'll not only discuss how it works in SharePoint Embedded but also provide best practices to maximize its benefits.

Recycle Bin Functionality in SharePoint Embedded

The recycle bin in SharePoint Embedded is like a safety net for your files. When you accidentally delete a file or folder, it doesn't disappear forever. Instead, it moves to the recycle bin, just like in regular SharePoint.

You can easily bring back any files or folders that you accidentally deleted from the recycle bin. If you're sure you don't need something anymore, you can also permanently remove it from the recycle bin.

One thing to remember is SharePoint Embedded has a simpler recycle bin compared to regular SharePoint. In SharePoint Online, deleted items go through two stages before they're gone for good. But in SharePoint Embedded, there's only one stage.

Important: Once you remove something from the recycle bin in SharePoint Embedded, it's gone for good. So, be extra careful before you permanently delete anything.

Things to Keep in Mind

There are two main things to remember about the Recycle Bin:

  1. How long items stay in the Recycle Bin: By default, deleted files and folders stay in the Recycle Bin for 93 days.
  2. Storage Space: The size of the items in the Recycle Bin counts towards the total storage space used by your container.

About that 93-day limit

This 93-day period starts the moment you delete something. You can actually change this limit to anywhere between 7 and 180 days. You can set a short limit (like 7 days) to free up space quickly, or a longer limit (like 180 days) if you want to be extra cautious.

Changing the limit only affects items deleted after the change. Items already in the Recycle Bin will keep their original 93-day (or whatever the previous limit was) period.

Storage Space

It's important to keep an eye on the amount of storage space used by items in the Recycle Bin. You can set up automatic processes to:

  • Warn users about the storage space being used by the Recycle Bin.
  • Automatically delete items that have been in the Recycle Bin for a certain amount of time.
  • Automatically delete a certain number of the oldest items in the Recycle Bin.

Keeping Your Recycle Bin Organized

As we mentioned earlier, managing the recycle bin is important. Here are some ways to keep it under control:

  • Check the recycle bin regularly: See what's in there and decide if you need to keep it.
  • Set up automatic tasks: You can automate tasks like deleting old items or notifying users about storage space used by the recycle bin.
  • Choose a good retention period: Decide how long you want to keep deleted items in the recycle bin before they're permanently erased.
  • Educate users: Teach them how to use the recycle bin and what its limitations are.
  • Provide clear instructions and support: Make it easy for users to find information on how to use the recycle bin.

Remember, SharePoint Embedded is a bit different.

Unlike SharePoint Online, SharePoint Embedded interacts with the recycle bin through the Microsoft Graph API. This means you'll need to use tools like PowerShell scripts or custom apps to manage the recycle bin.

The Microsoft Graph API provides several endpoints for managing the recycle bin. You can find more information about these endpoints on the Microsoft Graph API learning site under the "Files > File storage container" group. Here are the key endpoints:

By using these endpoints correctly, you can monitor your recycle bin and ensure it meets your needs.

Conclusion

The Recycle Bin in SharePoint Embedded is a vital tool for preventing data loss. While similar to its counterpart in standard SharePoint, it has unique characteristics. By understanding these differences and implementing best practices like regular monitoring and setting appropriate retention periods, organizations can effectively manage the Recycle Bin within their SharePoint Embedded solutions.

Remember that managing the Recycle Bin often involves using the Microsoft Graph API. By leveraging these tools and educating users, you can ensure a secure and efficient document management environment within your SharePoint Embedded implementation.

References

Top comments (0)