🎉 Our Office 365 Reporting Tool is now available in Azure Marketplace 🚀
This website uses cookies to improve your experience. We'll assume you're ok with this. Know more.
SharePoint Online

How to Get SharePoint Online Document Library Report

Document libraries in SharePoint Online serve as key features for users to store, organize, and manage files. Users can create multiple document libraries to categorize documents efficiently based on projects, departments, etc. However, managing these libraries poses challenges, making it difficult to locate essential documents quickly. Thus, we help you organize and secure your Microsoft 365 files by listing all document libraries in SharePoint Online.

Using SharePoint Online

Microsoft 365 Permission Required
SPO Site owner.
  • Navigate to the desired SharePoint Online site.
  • Select Site contents. Under the Contents section, you can see a list of all SharePoint Online lists and document libraries of the site.
Using SharePoint Online
  • Click on the desired one to get all files available in the document library.

Using Windows PowerShell

Microsoft 365 Permission Required
SPO Site owner.
  • Connect to SharePoint Online PnP PowerShell using the below cmdlet.
  • Windows PowerShell Windows PowerShell
     Connect-PnPOnline -Url <DesiredSite’sURL> -Interactive
  • Run the below cmdlet to get all document libraries in the specified SharePoint Online site using PowerShell.
  • Windows PowerShell Windows PowerShell
     Get-PnPList | Where-Object {$_.BaseType -eq "DocumentLibrary"}
Using Windows PowerShell
  • Gain visibility into both unhidden and hidden document libraries.

Using PowerShell Script

Microsoft 365 Permission Required
SPO Site owner.
  • However, the above cmdlet lacks detailed information on item counts and storage details of document libraries. Therefore, we’ve prepared a PowerShell script that shows the file and folder count, and the storage size of each document library.
  • Download and run the following script in the Administrator PowerShell.
  • Note: You must run the script in PowerShell 7 or a higher version to get the desired results.
Using PowerShell Script
DocumentLibraryReport.ps1 The script meets the following requirements to assist in SharePoint Online document library management:
  • List all document libraries across all SharePoint sites.
  • Get a list of document libraries for a single site.
  • Get all document libraries for multiple sites.

Simplify document management with insightful SharePoint Online reports!

The AdminDroid SharePoint Online reporting tool allows you to get a detailed report on all document libraries in your Microsoft 365 organization. Additionally, it allows you to audit file access activities within these document libraries to ensure only authorized individuals access them.

Detailed File Access Activities in SPO

Tap into the SharePoint Online file access report to verify that only authorized users are accessing the files in document libraries.

Unified View of Document Libraries in SPO

Delve into the document library dashboard in SharePoint Online to gain insights into various document libraries based on their configurations and activities.

In-Depth Analysis of Folder Activities in SPO

Find who moved a folder to other document library and ensure that sensitive folders are appropriately placed in a library with restricted access.

Granular Insights into SharePoint Online Activities

Inspect the SharePoint Online activity reports to identify any unauthorized actions that may pose a potential threat to the files stored in your document libraries.

Insider's Guide to SharePoint Online External Sharing

Rely on the SharePoint Online external sharing report to identify and prevent accidental sharing of confidential data with external users.

Streamlined Management of SharePoint Online Storage

Utilize the SharePoint Online usage report to mitigate storage issues by managing unused files stored in your document libraries.

AdminDroid empowers you to efficiently manage SharePoint Online by offering comprehensive insights into permissions and files within document libraries. With its advanced reporting features, you can secure your sensitive data and maintain an organized warehouse for your documents.

Explore a full range of reporting options

Important Tips

Utilize the preservation hold library in SharePoint Online to access the content that may have been deleted due to the retention policies configured in the SharePoint site.

Find inactive document libraries and delete unwanted ones to optimize storage space in your SharePoint Online environment.

Audit anonymous access in SharePoint Online to detect any suspicious users attempting to access confidential files within your document libraries.

Common Errors and Resolution Steps

The following are the possible errors and troubleshooting hints while dealing with SharePoint Online document libraries.

Error The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator.

This error occurs when you to try to perform certain tasks within a document library that exceeds the view threshold of 5000 items.

Fix Move files to other document libraries and index the columns to prevent this issue in future.

Error You don't have permission to add files to this folder so we couldn't upload <FileName>.

This error occurs when you have only the "View" permission in the document library.

Fix Run the below cmdlet and assign "Edit" or "Full control" permission in SharePoint Online PnP PowerShell.
Set-PnPListPermission -Identity "<DocumentLibraryName>" -User "<UserPrincipalName>>" -AddRole 
"<DesiredPermissionLevel>"

Error Access denied. You do not have permission to perform this action or access this resource.

This error occurs when you try to upload a file or folder to a style library in SharePoint without allowing custom scripts.

Fix Run the below cmdlet to allow users to use custom scripts in SharePoint Online.
Set-SPOSite <SiteURL> -DenyAddAndCustomizePages $False

Error Set-PnPListPermission : This operation is not allowed on an object that inherits permissions.

This error occurs when you try to set custom permissions for a document library that inherits permissions from its parent site.

Fix Run the below cmdlet to stop inhering permissions for a document library.
Set-PnPList -Identity "<DocumentLibraryName>" -BreakRoleInheritance

Error Set-PnPList : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

This error occurs when you try to configure settings for a document library without having site admin or owner permissions.

Fix Ask your Global admin to assign either site owner or admin permissions to you.

Frequently Asked Questions

List All Document Libraries to Streamline Content Organization in Microsoft 365

How to create a document library in SharePoint Online?

How to create a document library in SharePoint Online? +

When you create a SharePoint Online site, a default document library is created which stores all the files shared within the site. You can also create additional document libraries by following the steps below.

Create a New Document Library in SharePoint Online

  • Navigate to the desired SharePoint Online site. Under the Site contents section, click on "+New" and select Document library.
  • Click on Blank library. If you want to use specific templates, you can select the required one from the suggested options.
  • Give the library a name and description (optional) based on its purpose. You can also pick a Microsoft 365 sensitivity label to prevent unauthorized users from accessing the files in the library.
  • If you want to hide this library from the main page, you can uncheck the "Show in site navigation" checkbox (checked by default). Click on Create.

You can then create, upload, and share files in a document library.

Create a Document Library Using PowerShell

  • Connect to SharePoint Online PnP PowerShell using the below cmdlet.
    Connect-PnPOnline -Url <DesiredSite’sURL> -Interactive
  • Run the below cmdlet to create a document library in SharePoint Online using PowerShell.
    New-PnPList -Title "<DocumentLibraryName>" -Template DocumentLibrary -OnQuickLaunch
Create bulk document libraries in SharePoint Online:

Run the PowerShell script below to create multiple document libraries in SharePoint Online.

Connect-PnPOnline -Url <DesiredSite’sURL> -Interactive
newlibraries = @("Library1","Library2", "Library3", "Library4")
foreach ($DocumentLibraryName in $newlibraries) { New-PnPList -Title $DocumentLibraryName -Template DocumentLibrary}

AdminDroid provides a convenient way to check recent document library creations by utilizing the Created column.

  • You can use the sorting feature to quickly locate both recently created and oldest document libraries in SharePoint Online.
  • Handy Hint: Refer to the "Item Count" column to identify the document libraries with the highest number of items. This facilitates the deletion of unwanted files that may contribute to storage issues.
created-document-libraries

How to upload, create, and delete files in a document library?

How to upload, create, and delete files in a document library? +

You can seamlessly manage document libraries with many items in SharePoint Online. Follow the steps below to create, upload and delete files in a document library.

Create a New File in a Document Library

  • Navigate to the desired SharePoint Online site. Under the Site contents section, select the desired document library in which you want to create files.
  • Select the New option at the top and choose the type of document you wish to create. It can be a Word document, Excel workbook, Link, PowerPoint presentation, etc.

Upload Files to a Document Library

  • Select the Upload option at the top and choose "Files". You can also upload folders or templates to the document library.

Delete Files from a Document Library

  • Click on the ellipses near the file you wish to delete and select "Delete". Now, the file will be moved to the site’s recycle bin.

It is important to note that the size limit of a SharePoint Online document library is 30 million items per library.

However, after reaching a limit of 5000 items, you will be restricted from carrying out certain tasks like adding columns, viewing more than 5000 items in a single view, etc.

What are the types of SharePoint Online document libraries?

What are the types of SharePoint Online document libraries? +

Document libraries within a SharePoint site provide a secure platform for storing and organizing files based on your needs. You can create different document libraries to classify files under various categories. It is the best way to display documents in SharePoint Online.

A few types of document library in a SharePoint Online site are,

  • Document Library : This is the most basic format for storing any type of documents in a SharePoint Online site. A default document library will be created when you create a new site, and it will store all the files shared in that site.
  • Site Pages Library : It stores all the pages created in the SharePoint Online site. It is a system-generated library and you cannot upload any pages. However, you can create a new wiki page, web part page, site page, or a link to any other page.
  • Site Assets Library : It is also a system-generated library that stores all the media files used to build the site such as audio & video files, icons, thumbnails, notebooks, etc. Additionally, you can also upload other types of files to it.
  • Style Library : The Style Library is primarily used for storing assets related to branding and customization, such as CSS files, JavaScript files, images, and master pages. It is commonly used to store files that control the visual appearance and behavior of SharePoint sites.

How to give unique permissions to a SharePoint document library?

How to give unique permissions to a SharePoint document library? +

When you create a document library, it will inherit access permissions from its parent site. However, you may want to control who has access to a document library for restricted access.

Follow the steps below to set permissions for a SharePoint document library:

  • Navigate to the desired SharePoint Online site. Under the Site contents section, select the desired document library for which you want to set unique permissions.
  • Click on the Settings icon and select Library settings»More library settings.
  • Under Permissions and Management, select the "Permissions for this document library" link.
  • Choose the "Stop Inheriting Permissions" option to break permission inheritance from the parent site. Click on Grant Permissions to assign unique permissions.
  • You can then invite users by typing their email addresses and a personal message. Click on SHOW OPTIONS. Here, you have the option to send an email invitation to the desired users.
  • Select a desired permission level for the invited users and click on Share.

If you wish, you can edit permissions for existing users or SharePoint groups using the Edit User Permissions option. Here, you can choose various permission levels like Full Control, Edit, Design, Contribute, Read, etc.

If you prefer to restrict access for current users or SharePoint groups, utilize the Remove User Permissions option to revoke their access.

With AdminDroid’s SharePoint Online document library permissions report, you can easily find all the document libraries with custom permissions.

  • You can use the List Name easy filter to check whether a specific document library is configured with unique permissions or not.
  • Handy Hint: If you find any confidential libraries without unique permissions, you can use the "Set-PnPListPermission" cmdlet to change document library permissions for restricted access.
custom-permissions-libraries

How to create a custom view of a document library?

How to create a custom view of a document library? +

SharePoint Online offers customization options for viewing document libraries to suit your preferences. For instance, you can include necessary columns and arrange them in your preferred order, ensuring your document library remains organized for quick reference.

Follow the steps below to create a view in a document library:

  • Navigate to the desired SharePoint Online site. Under the Site contents section, select the desired document library for which you want to create a custom view.
  • Click on the Settings icon and select Library settings»More library settings.
  • Under the Views section, select the "Create view" link. You can choose the desired view type such as Standard, Datasheet, Calendar, and Gantt.
  • Give your view a name and choose the audience. By default, Public View is chosen, allowing anyone on the site to access it. If you wish, you can choose the Personal View option so that only you can use this view.
  • Choose the columns you want to display. You can also set sorting, filtering, and grouping options to align with your specific needs. Configure other settings like row limits, style, and whether to display folders.
  • Click on OK. Now, you can access the created view form the drop-down list present at the top right corner of the document library.
document-library-views

What are the best practices for managing a document library?

What are the best practices for managing a document library? +

Before using document libraries for organizing your files, take note of the following best practices for efficient document management in SharePoint Online.

  • Customize Permissions for a Document Library : Set unique permissions for each document library to ensure that only authorized users can access the files within them.
  • Utilize Metadata in SharePoint Online : Leverage metadata to classify documents based on various attributes such as author, creation date, department, project, etc. This enables more efficient sorting, filtering, and searching of documents within the document library.
  • Enable and Configure Versioning for a Document Library : Implement version control for a document library to track changes and allow for reverting to previous versions as needed. Additionally, delete unwanted versions to manage storage space in SharePoint Online.
  • Add Content Type to a Document Library : Enable and add content types to help define the type of information stored in a document library. You can include necessary fields for each content type to ensure that relevant information is filled out when uploading a document of that type.
  • Setup Alerts on Changes in a Document Library : Create an alert to get notified whenever a file or folder is modified in a SharePoint Online document library.
  • Create Views in a SharePoint Document Library : Create, change, or delete a view of a document library to organize the items based on your preferences.

By following the above document library best practices, you can keep your files organized for easy retrieval of crucial ones.

Additionally, you can also add a document library to a SharePoint page for quick access to important documents.

  • Navigate to the desired SharePoint Online site page. Hover your mouse on the page to locate the + icon mentioned as "Add a new web part in column one" and click on it.
  • Choose Document library from the list of available SharePoint Online web parts and select the desired one.
  • Hit on Republish to display the list of document libraries on a SharePoint page.
+

Kickstart Your Journey With
AdminDroid

Your Microsoft 365 Companion with Enormous Reporting Capabilities

Download Now
User Help Manuals Compliance Docs
x
Delivering Reports on Time
Want a desired Microsoft 365 reports every Monday morning? Ensure automated report distribution and timely delivery with AdminDroid's Scheduling to your email anytime you need.
Delivering Reports on Time
Schedule tailored reports to execute automatically at the time you set and deliver straight to the emails you choose. In addition, you can customize report columns and add inteligent filtering to the activities just from the previous day to suit your Microsoft 365 report requirements.
Set It, Schedule It, See Results- Your Reports, Your Way, On Your Time!
Time Saving
Automation
Customization
Intelligent Filtering
Give Just the Right Access to the Right People
Grant fine-tuned access to any Microsoft 365 user with AdminDroid’s Granular Delegation and meet your organization’s security and compliance requirements.
Give Just the Right Access to the Right People
Create custom roles loaded with just the right permissions and give access to admins or normal users within AdminDroid. The result? A streamlined Microsoft 365 management experience that aligns your organization's security protocols and saves your invaluable time and effort.
Align, Define, Simplify: AdminDroid's Granular Delegation
Smart Organizational Control
Effortless M365 Management
Simplified Access
Advanced Alerts at a Glance
Receive quick notifications for malicious Microsoft 365 activities. Engage with the AdminDroid’s real-time alert policies crafted to streamline your security investigations.
Advanced Alerts at a Glance
Stay informed of critical activities like suspicious emails and high-risk logins, bulk file sharing, etc. Through creating and validating ideal alert policies, AdminDroid provides a comprehensive approach to real-time monitoring and management of potential threats within your organization.
AdminDroid Keeps You Always Vigilant, Never Vulnerable!
Proactive Protection
Real-time Monitoring
Security Intelligence
Threat Detection
Merge the Required Data to One Place
Combine multiple required columns into one comprehensive report and prioritize the information that matters most to you with AdminDroid’s Advanced Column Customization.
Merge the Required Data to One Place
This column merging capability offers a flexible way to add different columns from various reports and collate all the essential data in one place. Want to revisit the customized report? Save it as a 'View’, and your unique report is ready whenever you need it.
Merge with Ease and Save as Views!
Custom Reporting
Unique View
Desired Columns
Easy Data Interpretation
Insightful Charts and Exclusive Dashboards
Get a quick and easy overview of your tenant's activity, identify potential problems, and take action to protect your data with AdminDroid’s Charts and Dashboards.
Insightful Charts and Exclusive Dashboards
With AdminDroid charts and dashboards, visualize your Microsoft 365 tenant in ways you've never thought possible. It's not just about viewing; it's about understanding, controlling, and transforming your Microsoft 365 environment.
Explore Your Microsoft 365 Tenant in a Whole New Way!
Executive overviews
Interactive insights
Decision-making
Data Visualization
Efficient Report Exporting for Microsoft 365
Downloading your reports in the right file format shouldn’t be a hassle with AdminDroid’s Report Export. Experience seamless report exporting in various formats that cater to your needs.
Efficient Report Exporting for Microsoft 365
Navigate through diverse options and export Microsoft 365 reports flawlessly in your desired file format. Tailor your reports precisely as you need them and save them directly to your computer.
Take Control, Customize and Deliver- Your Office 365 Data, Exported in Your Way!
Easy Export
Seamless Downloading
Data Control
Manage Microsoft 365

Get AdminDroid Office 365 Reporter Now!