SharePoint provides powerful collaboration features to users including lists and libraries, and while transparency is crucial, there are instances where hiding a list or library becomes essential for optimizing user experiences and/or maintaining data integrity. Example: Power Apps often relies on SharePoint lists as data sources. However, not all lists are meant for end users to view directly. By hiding lists or libraries from SharePoint UI, you can prevent end users from editing the data directly from SharePoint lists.
In this blog post, we’ll explore how to hide a SharePoint list or document library using PnP PowerShell & CLI for Microsoft 365 and view all hidden lists/libraries in SharePoint site using PnP PowerShell & CLI for Microsoft 365.
Hiding a SharePoint List or Library using PnP PowerShell
You can use below PnP PowerShell script to hide a SharePoint online list or document library from SharePoint UI (Site Contents page):
# SharePoint Online site URL $siteUrl = Read-Host -Prompt "Enter your SharePoint online site URL (e.g https://contoso.sharepoint.com/sites/work)"
# Display name of SharePoint online list or document library $listName = Read-Host -Prompt "Enter the display name of your SharePoint list or library (e.g My List)"
# Connect to SharePoint online site Connect-PnPOnline -url $siteUrl -Interactive
# Hide SharePoint online list from UI Set-PnPList -Identity $listName -Hidden $true
Hide a SharePoint List or Library using CLI for Microsoft 365
Use below CLI for Microsoft 365 script to hide a SharePoint list or document library from SharePoint UI:
# SharePoint Online site URL $siteUrl = Read-Host -Prompt "Enter your SharePoint online site URL (e.g https://contoso.sharepoint.com/sites/work)"
# Display name of SharePoint online list or document library $listName = Read-Host -Prompt "Enter the display name of your SharePoint list or library (e.g My List)"
# Get Credentials to connect $m365Status = m365 status if ($m365Status -match "Logged Out") { m365 login }
# Hide SharePoint online list or library from UI (Site Contents) m365 spo list set --webUrl $siteUrl --title $listName --hidden true
View hidden lists/libraries in SharePoint site using CLI for Microsoft 365
Use below CLI for Microsoft 365 script to view all hidden lists and document libraries in the given SharePoint online site:
# SharePoint Online site URL $siteUrl = Read-Host -Prompt "Enter your SharePoint online site URL (e.g https://contoso.sharepoint.com/sites/work)"
# Get Credentials to connect $m365Status = m365 status if ($m365Status -match "Logged Out") { m365 login }
# Hide SharePoint online list or library from UI (Site Contents) m365 spo list list --webUrl $siteUrl --properties "Id,Title,Url" --filter "Hidden eq true" | ConvertFrom-Json
Using pages in SharePoint is a great way to share information or any news/announcement in your organization to SharePoint site users. SharePoint site pages can be improved by utilizing banner images in the page title area. Adding banner images to the page title area not only makes the page more visually appealing but also helps to convey the page’s purpose to the user more quickly and effectively.
In this blog post, we will see how to change the SharePoint Page Banner Image using PnP PowerShell.
First of all upload a high quality image in one of the document libraries in your SharePoint site. SharePoint site page banner images in title area look best when they are landscape or 16:9 or greater in aspect ratio, and when they are at least 1 MB in size. Check this Microsoft official documentation for recommended specifications for banner images: Image sizing and scaling in SharePoint modern pages
Then you can use below PnP PowerShell script to update the banner image at the top of the SharePoint online modern page:
# SharePoint online site URL
$siteUrl = "https://contoso.sharepoint.com/sites/wlive"
# Connect to SharePoint online site
Connect-PnPOnline -Url $siteUrl -Interactive
# Update SharePoint site page banner image
Set-PnPPage -Identity "Open-Door-Policy" -HeaderType Custom -ServerRelativeImageUrl "/sites/wlive/SiteAssets/work-remotely.jpeg"
Once you run above script successfully, you will find that banner image for your SharePoint site page is updated successfully:
Update SharePoint Page Banner Image using PnP PowerShell
The internal name of a SharePoint column is a unique name that is automatically generated by SharePoint when a column is created. It is used by SharePoint internally to reference and retrieve the value of a particular column associated with an item or document. The internal name is generated based on the display name you provide but all special characters and spaces will be replaced with Unicode’s by SharePoint. Internal name is generated only once while creating a new column and it cannot be changed even if you change the display name of SharePoint column.
The internal name is not visible to users in the SharePoint user interface by default, but it is commonly used in various scenarios, such as in SharePoint REST APIs, Power Automate flow expressions, Power Apps formulas, PowerShell, etc. to interact with column data programmatically.
Where are Internal names of SharePoint columns used?
Custom Scripts: When creating custom scripts, such as JavaScript or PowerShell, the internal names of columns are required to reference and manipulate the values of the columns while interacting with SharePoint data.
Workflows: In SharePoint Designer workflows or Microsoft Power Automate (formerly known as Microsoft Flow), the internal names of columns are used to reference the values of the columns as inputs or outputs in the workflow actions and in expressions.
Custom Solutions: When building custom solutions, such as SharePoint apps, SharePoint framework (SPFx) web parts, or custom code, the internal names of columns are required to interact with the columns programmatically.
Power Apps: Few of the Power Apps functions like ShowColumns, SortByColumns, etc. requires using internal names of SharePoint columns in formula.
JSON Formatting: Internal name of SharePoint column is required in JSON formatting to reference the column value with [$InternalNameOfColumn] syntax.
How to find the Internal name of a SharePoint column?
Using Modern experience list view
You can use sorting or filtering options from SharePoint online modern experience list view to find the internal name of a SharePoint column. Sort by and Filter by options are supported by most of the column types in SharePoint like Single line of text, Choice, Number, Date and Time, Yes/No (Boolean), Person or Group (single selection), etc.
For this afticle, we will use sorting based on SharePoint choice column as an example:
1. Go to the SharePoint online list for which you want to check the internal name of a column.
2. Click on column name/header from the list view and select either Ascending (A to Z) or Descending (Z to A) option from the popup menu:
Find internal name of SharePoint column by sorting choice column
3. SharePoint will sort the list view based on selection and the browser URL will be changed like:
Where column name (ChoiceColumn) after sortField= is the internal name of your SharePoint choice column.
4. Similarly, when you use Filter by option in SharePoint modern experience to filter the list view based on Date and Time column (named as Start Date), SharePoint changes browser URL like:
Where column name (Start_x0020_Date) after FilterField1= is the internal name of your SharePoint date and time column. Notice _x0020_ in internal column name which is an Unicode encoding of the space character in the display name of date and time column (Start Date).
Using Classic experience List settings page
Few of the SharePoint column types like Multiple lines of text, Hyperlink or Picture, Image, etc. does not support sorting or filtering from SharePoint modern experience list views. So, you have to use the classic experience list settings page to find the internal name for such SharePoint columns.
Follow below steps to find the internal name of multiple lines of text column using SharePoint classic experience list settings page:
1. Go to the SharePoint online list for which you want to check the internal name of a column.
2. Click on Settings (gear) icon from the top right corner and select List settings:
Open SharePoint online list settings page
3. From list settings page, scroll down to the Columns section and click on the column name for which you want to find the internal name:
Open SharePoint online Column settings page
4. SharePoint will open column settings page for the respective column with browser URL like:
SharePoint online column settings page showing internal name of column
Where column name (MultilineTextCol) after Field= is the internal name of your SharePoint online multiple lines of text column.
Note: You can use this classic experience method to find out the internal name of SharePoint columns for all column types.
Using SharePoint REST API
You can use SharePoint REST API endpoint like below to get the internal name of SharePoint column based on it’s display name. Open URL in below format directly from browser tab:
https://contoso.sharepoint.com/sites/SPConnect/_api/web/lists/getbytitle('InternalNames')/fields?$select=Title,InternalName&$filter=Title eq 'Multiline Text Column'
Find internal name of SharePoint column using SharePoint REST API
Using PnP PowerShell
You can use below PnP PowerShell script to find the internal name of SharePoint online list column using PnP PowerShell:
# SharePoint online site URL
$siteUrl = "https://contoso.sharepoint.com/sites/wlive"
# Display name of SharePoint list
$listName = "InternalNames"
# Display name of SharePoint list column
$columnName = "Multiline Text Column"
# Connect to SharePoint online site
Connect-PnPOnline -Url $siteUrl -Interactive
# Get internal name of SharePoint list column
Get-PnPField -Identity $columnName -List $listName | Select Title,InternalName
Find internal name of SharePoint column using PnP PowerShell
Using CLI for Microsoft 365
You can use below CLI for Microsoft 365 script to find the internal name of SharePoint online list column using CLI for Microsoft 365:
# SharePoint online site URL
$siteUrl = "https://contoso.sharepoint.com/sites/wlive"
# Display name of SharePoint list
$listName = "InternalNames"
# Display name of SharePoint list column
$columnName = "Multiline Text Column"
# Get Credentials to connect
$m365Status = m365 status
if ($m365Status -match "Logged Out") {
m365 login
}
# Get internal name of SharePoint list column
m365 spo field get --webUrl $siteUrl --listTitle $listName --title $columnName --output text
Find internal name of SharePoint column using CLI for Microsoft 365
Best practices for naming SharePoint columns
When creating columns in SharePoint, it’s important to follow best practices for column naming to avoid using special characters or Unicode characters in internal names. Here are some recommended best practices:
Use only alphanumeric characters: Stick to using letters (A-Z, a-z) and numbers (0-9) in column names. Avoid using special characters such as @, #, $, %, _, etc. Avoid column names beginning with numbers.
Avoid spaces: Use PascalCase to separate words in column names instead of spaces. For example, use ColumnName instead of Column Name. This can help prevent issues with URLs, Unicode encoding, and referencing column names in scripts or code.
Avoid reserved words: SharePoint has reserved words that are used for system functionality, and using them in column names may cause conflicts. Examples of reserved words include “ID”, “Modified”, “Created”, “Title”, etc. Avoid using these reserved words as column names.
Keep it concise and meaningful: Use descriptive and meaningful names for columns that clearly indicate their purpose. Avoid using vague or generic names that may be confusing or ambiguous to users. Use column description to provide more information about the columns.
Be consistent: Establish a consistent naming convention for columns across your SharePoint site or site collection to ensure uniformity and ease of management. This can also help with documentation, training, and maintenance of your SharePoint environment.
I hope you liked this article. Give your valuable feedback & suggestions in the comments section below and share this article with others.
“SharePoint spaces is a web-based, immersive platform, which lets you create and share, secure and extensible mixed reality experiences. Add a new dimension to your intranet by using 2D and 3D web parts to create your mixed reality vision.”
SharePoint Spaces allows users to easily build mixed reality experiences that interact with content stored in SharePoint Online.
SharePoint spaces empower creators to build immersive mix reality experiences with point-and-click simplicity. You can get started with smart templates to create a mixed reality environment complete with beautiful surroundings, ambient sounds, rich textures, and lighting. You then add content, which can include files you already have in SharePoint, allowing you to repurpose your existing data, documents, and images.
History & Roadmap
Microsoft announced SharePoint Spaces first time during its annual SharePoint Virtual Summit held in May 2018.
Microsoft announced SharePoint spaces public preview in April 2020, Roadmap.
Microsoft added 360° tour web part in SharePoint spaces which allows creation of immersive virtual tours for SharePoint sites, Roadmap.
Microsoft added touch device support in SharePoint spaces which enables users to interact with a space using touch interactions in addition to the mouse and keyboard-based interactions, Roadmap.
Microsoft announced General Availability of SharePoint spaces, Roadmap.
Org Chart in a SharePoint Space
That’s it for SharePoint spaces introduction and history. Let’s see how you can enable SharePoint spaces in your SharePoint online site to get started with it.
Enable SharePoint spaces in a site
SharePoint spaces are not enabled by default in SharePoint online site. To use SharePoint spaces, we need to enable a site feature named “Spaces”.
You can activate this feature using any one of the methods given below:
Manually:
You can activate Spaces feature from user interface by navigating to Manage site features page.
Go to SharePoint site where you want to build a space
Click on Settings (gear icon), select Site information and then select View all site settings.
On the Site settings page, select Manage site features under Site Actions.
Scroll down the page to Spaces feature and click on Activate button.
Wait till the page refreshes and confirm that feature is activated successfully.
Activated Spaces feature
Using PnP PowerShell:
You can easily activate features in SharePoint online using PnP PowerShell. To activate a site feature using PnP PowerShell you will need the GUID of feature. Check how you can quickly get the GUID of a site feature. GUID of Spaces feature is 2ac9c540-6db4-4155-892c-3273957f1926.
Use below command to activate Spaces feature:
Enable-PnPFeature -Identity 2ac9c540-6db4-4155-892c-3273957f1926 -Scope Web
You can find the detailed example of how to activate a site feature in SharePoint Online using PnP PowerShell here.
To get an idea about what you can do using SharePoint spaces, check out some of the awesome samples here.
In my previous blog about Introduction to SharePoint Spaces, I explained different methods to enable SharePoint spaces in a SharePoint online site. One of the method was to activate a Spaces feature using PnP PowerShell.
So, I thought of writing a separate blog on how to activate a site feature in SharePoint Online using PnP PowerShell.
In SharePoint Online, we can easily activate a feature using Enable-PnPFeature cmdlet. To activate a feature using PnP PowerShell you will need the GUID of feature. Check how you can quickly get the GUID of a site feature.
In this blog, we will activate a site level feature named Spaces whose GUID is 2ac9c540-6db4-4155-892c-3273957f1926.
$siteUrl = "https://tenant.sharepoint.com/Sites/siteName"
$featureScope = "Web" #Scope of feature
$featureId = "2ac9c540-6db4-4155-892c-3273957f1926" #SharePoint Spaces Feature
#Connect to SharePoint site
Connect-PnPOnline -Url $siteURL -Interactive
#Get Feature from SharePoint site
$spacesFeature = Get-PnPFeature -Scope $featureScope -Identity $featureId
#Check if feature is already activated or not
if($spacesFeature.DefinitionId -eq $null) {
Write-host "Activating Feature ($featureId)..."
#Activate the Feature
Enable-PnPFeature -Scope Site -Identity $FeatureId -Force
Write-host -f Green "Feature ($featureId) has been activated Successfully!"
}
else {
Write-host "Feature ($featureId) is already active on this site!"
}
Output:
Activated Spaces feature
Similarly, you can also activate the site collection level features by changing -Scope to “Site”.
I hope you liked this blog. Give your valuable feedback & suggestions in the comments section below and share this blog with others.
Inline message translation is a Microsoft Teams feature that allow users to translate Teams messages into the language specified by their personal language settings. This nice feature is already available in Microsoft Teams Desktop client and web.
Now, Microsoft is releasing the inline message translation feature for Microsoft Teams iOS and Android apps which will allow users to translate channel posts that are in another language, into the language of their choice. Microsoft will make this feature available to iOS and Android users with the latest app store updates starting from early June to mid-July.
How this works?
After updating the Microsoft Teams app from app store, end users will be able to translate channel posts into their preferred language while working on their Android and iOS devices.
To translate the channel post or reply, user has to press and hold the message and then select Translate. The post/reply will be translated to the language specified by their personal language settings. To return a translated message to the original language, press and hold the translated message and then select See original (language).
Inline message translation in Microsoft Teams iOS and Android
How to set the translation language?
To set the preferred language that you want messages translated to, go to Settings –> select Translation and then choose the desired language under Translate messages into this language.
Set inline message translation language in Microsoft Teams iOS or Android
How to Turn on/off inline message translation in Microsoft Teams?
The ability to translate messages will be on by default in Microsoft Teams. If you want to turn off the inline message translation in Microsoft Teams or if you have turned it off previously & now you want to turn it on, follow below steps:
Select Messaging Policies from the left navigation
Either create a new policy or edit an existing policy
Set the Translate messages option to On/Off
You can also turn on/off inline message translation in Microsoft Teams using PowerShell command Set-CsTeamsMessagingPolicy. You need to set the -AllowUserTranslation parameter to true to allow users to translate messages & false to prohibit users from translating messages in Microsoft Teams.
SharePoint Online offers powerful web parts and features that enhance the visual appeal of your sites, including the ability to search for external images on the web while using web parts like Image, Hero, Image Gallery, Quick links, etc. While this feature can be valuable in various contexts, there are scenarios where organizations prefer to disable or hide the option to search for external images especially when they have created organization assets libraries in the SharePoint tenant.
In this blog post, we’ll explore how to hide/disable the “Web search” feature in SharePoint using SharePoint Online PowerShell, PnP PowerShell and CLI for Microsoft 365.
Using SharePoint Online PowerShell
Use below SharePoint Online PowerShell script to disable or enable external image “Web Search” feature in SharePoint Online tenant:
# SharePoint online admin center URL $adminCenterUrl = Read-Host -Prompt "Enter your SharePoint admin center site URL (e.g https://contoso-admin.sharepoint.com/)"
# Connect to SharePoint online admin center Connect-SPOService -Url $adminCenterUrl
You can use below PnP PowerShell script to hide/disable external image “Web Search” feature in SharePoint Online:
# SharePoint online admin center URL $adminCenterUrl = Read-Host -Prompt "Enter your SharePoint admin center site URL (e.g https://contoso-admin.sharepoint.com/)"
# Connect to SharePoint online admin center Connect-PnPOnline -Url $adminCenterUrl -Interactive
Disabling or hiding the web search for external images in SharePoint Online is a strategic choice for organizations that prioritize content security, brand consistency and compliance. By following the methods outlined in this blog post, you can tailor your SharePoint environment to align with your organization’s policies and enhance the overall governance of your digital assets.
In this blog post, we will explore how to remove or unregister a SharePoint online document library from organization assets libraries using PnP PowerShell and CLI for Microsoft 365.
Using PnP PowerShell
You can use below PnP PowerShell script to remove a SharePoint document library that was designated as a central location for organization assets across the tenant:
# URL of SharePoint online document library $libraryUrl = "https://contoso.sharepoint.com/sites/OrgAssets/CompanyLogos"
# SharePoint online admin center URL $adminCenterUrl = Read-Host -Prompt "Enter your SharePoint admin center site URL (e.g https://contoso-admin.sharepoint.com/)"
# Connect to SharePoint online admin center Connect-PnPOnline -Url $adminCenterUrl -Interactive
Note: It might take up to 24 hours to remove an organization assets library from “Your organization” tab in the file/image picker after you unregister it from the SharePoint tenant organization asset libraries.
In my previous blog post – Create an Organization Assets Library in SharePoint Online, I explained what is an Organization Assets Library in SharePoint, different types of organization assets libraries and provided a step-by-step guide on how to create organization assets libraries in SharePoint Online using SharePoint Online PowerShell.
In this blog post, we will explore how to register a SharePoint online document library as an organization assets library using PnP PowerShell and CLI for Microsoft 365. Before using below PowerShell scrips, follow this blog post until step #3 to create a SharePoint online communication site, granting proper permissions on the site and creating document libraries as per your requirements.
Using PnP PowerShell
You can use below PnP PowerShell script to register a SharePoint online document library as an organization assets library:
# URL of SharePoint online document library $libraryUrl = "https://contoso.sharepoint.com/sites/OrgAssets/CompanyLogos"
# Type of Organization assets library - ImageDocumentLibrary or OfficeTemplateLibrary $orgAssetType = "ImageDocumentLibrary"
# SharePoint online admin center URL $adminCenterUrl = Read-Host -Prompt "Enter your SharePoint admin center site URL (e.g https://contoso-admin.sharepoint.com/)"
# Connect to SharePoint online admin center Connect-PnPOnline -Url $adminCenterUrl -Interactive
# Register a document library as an organization assets library Add-PnPOrgAssetsLibrary -LibraryUrl $libraryUrl -OrgAssetType $orgAssetType
In the dynamic world of business collaboration, organizing and sharing digital assets efficiently is a key factor for success. SharePoint Online provides a robust solution for managing organizational assets through the creation of an “Organization Assets Library.” In this blog post, we’ll explore what an Organization Assets Library is and provide a step-by-step guide on how to create organization asset libraries in SharePoint Online.
What is an Organization Assets Library in SharePoint?
An organization assets library in SharePoint is a centralized repository for storing and managing digital assets like images such as company branding photos & logos and office templates like word, excel & PowerPoint documents that are commonly used across the organization. It provides a structured way to organize, access, and share these assets, ensuring consistency in branding (logos, style guides, templates) and seamless collaboration.
Types of Organization Assets Library
You can create two types of Organization Assets libraries in SharePoint Online:
Organization Asset Library for Images (ImageDocumentLibrary): Document library for images like branding images, company logos, etc. These images will be available under “Your organization” option when user opens the file picker while adding images in SharePoint web parts and pages.
Organization Asset Library for Office Templates (OfficeTemplateLibrary): Document library for office templates like word, excel and PowerPoint. These templates will be available when user creates a new office document from Office Apps. Follow this article for creating office templates.
How to Create an Organization Assets Library in SharePoint Online?
Step 1: Create a SharePoint Online site
You can use an existing site or create a new site for storing organization assets. The site can be of any type (communication site or team site). However, I will recommend you to create a new/blank communication site for hosting organization asset libraries. Follow this guide for creating a new SharePoint site: Create a site in SharePoint.
Step 2: Grant permissions on SharePoint Online site
Grant following permissions on the newly created SharePoint communication site:
Owners: Add users who should be able to upload files to asset libraries as well as manage permissions of the site.
Members: Add users who should be able to upload files to asset libraries.
Visitors: Add Everyone except external users group so that all users in tenant can see assets.
Step 3: Create Document libraries and upload assets
Create new document libraries to store the organization assets by following this guide: Create a document library in SharePoint. After creating document libraries, upload the images or office templates to your document libraries.
Step 4: Register Document library as organization asset library
First of all, download the latest version of SharePoint Online Management Shell. Then you can run SharePoint Online PowerShell script like below from SharePoint Online Management Shell to register a document library as an organization asset library for images (you can use $orgAssetType = "OfficeTemplateLibrary" for office templates asset library):
# URL of SharePoint document library $libraryUrl = "https://contoso.sharepoint.com/sites/OrgAssets/Images"
# Type of Organization asset library - ImageDocumentLibrary or OfficeTemplateLibrary $orgAssetType = "ImageDocumentLibrary"
# SharePoint online admin center URL $adminCenterUrl = Read-Host -Prompt "Enter your SharePoint admin center site URL (e.g https://contoso-admin.sharepoint.com/)"
# Connect to SharePoint online admin center Connect-SPOService -Url $adminCenterUrl
# Register document library as an organization asset library Add-SPOOrgAssetsLibrary -LibraryURL $libraryUrl -OrgAssetType $orgAssetType
You’ll be prompted to enable a content delivery network (CDN) while adding an organization asset library, type Y (Yes) or A (Yes to All) and press Enter.
If you get an error – Add-SPOOrgAssetsLibrary : This library is not on the site that contains other organization asset libraries while running above PowerShell script, that means some other organization asset libraries are already available in your Microsoft 365 SharePoint tenant. In that case, try this:
1. Firstly, check if you have any existing organization asset libraries in your Microsoft 365 tenant using this command:
Get-SPOOrgAssetsLibrary
2. Create a new document library on same SharePoint site where your existing organization asset libraries are created.
3. Run PowerShell script given in step 4 to register the newly created document library as an organization asset library.
Notes
You can create up to 30 organization asset libraries for a single tenant / organization.
All organization asset libraries must be on the same SharePoint site.
Only document libraries (not folders) can be set as organization asset libraries.
It may take up to 24 hours for the organization assets library to appear in the desktop office apps.
Users need at least read permissions on the SharePoint root site for the organization assets library to appear in the desktop office apps.
How to Remove an Organization Assets Library from SharePoint Online?
If you want to remove/unregister an existing organization asset library from your SharePoint tenant, you can use below SharePoint Online PowerShell script:
# URL of SharePoint document library $libraryUrl = "https://contoso.sharepoint.com/sites/OrgAssets/Images"
# SharePoint online admin center URL $adminCenterUrl = Read-Host -Prompt "Enter your SharePoint admin center site URL (e.g https://contoso-admin.sharepoint.com/)"
# Connect to SharePoint online admin center Connect-SPOService -Url $adminCenterUrl
# Remove/unregister an organization asset library in SharePoint tenant Remove-SPOOrgAssetsLibrary -LibraryUrl $libraryUrl
In conclusion, implementing an organization assets library in SharePoint Online can significantly enhance the management and utilization of essential resources within your organization. By centralizing assets, maintaining consistency, and enabling seamless collaboration, SharePoint empowers teams to work more efficiently and effectively.
SharePoint Online and Microsoft Lists offers a multitude of features to enhance collaboration and streamline data management. One such feature is the Quick Property Editing (Edit in Grid view), which allows users to bulk edit metadata for multiple list items directly from the list view. While this feature can improve efficiency, there are scenarios where disabling it becomes necessary. In this blog post, we’ll explore various methods to achieve this in SharePoint Online.
From SharePoint UI
Follow below steps to disable quick edit (Edit in grid view) from SharePoint list UI:
1. Go to your SharePoint Online list.
2. Click on Settings (gear icon) from the top right corner and select List settings.
3. Click on Advanced settings link from List settings page.
4. From Advanced settings page, scroll down and set Quick property editing (Allow items in this list to be edited using Quick Edit and the Details Pane?) to No.
5. Click OK button at the bottom of advanced list settings page.
Using PnP PowerShell
You can use below PnP PowerShell script to disable Quick property editing (Grid view) from SharePoint Online list or document library:
# Display name of SharePoint online list or document library $listName = "My SharePoint List"
# SharePoint online site URL $siteUrl = Read-Host -Prompt "Enter your SharePoint site URL (e.g https://contoso.sharepoint.com/sites/pnppowershell)"
# Connect to SharePoint online site Connect-PnPOnline -Url $siteUrl -Interactive
# Disable Quick property editing (Grid view) from SharePoint list Set-PnPList -Identity $listName -DisableGridEditing $true
Microsoft recently introduced a new feature of commenting in SharePoint Online lists and Microsoft lists. Using this feature users will be able to add and delete comments on list items. Users can view all comments on a list item and filter between views that show comments or activity related to an item in details pane.
Microsoft has started rolling out this feature to all SharePoint Online tenants in December 2020 release, see Roadmap.
Where can you find Comments options?
Comments options are currently located at below three places in SharePoint Online/Microsoft lists:
List view
Users can see which list items have comments when they access the SharePoint Online list view or Microsoft list home page. Comments option will be shown on command bar when you select a list item as well as at the right hand side of Title column. When you hover over on comments icon it will show you the count of comments added to the list item.
Comments options in List view
Display/Edit form
By default, users will see a new comments pane alongside the list item form when they access a list. Users can toggle the comment pane visibility by clicking the comments icon. When you hide comments, the pane does not collapse. The comments pane will be closed by default for lists customized by Power Apps.
Comments options on Display form
Details Pane
Users can see the Comments and All activity related to list item on details pane. Users can filter views that show comments or activity by using the dropdown under “More details” section.
Comments options in Details pane
Permission Considerations
Comments follow the permission settings inherent in SharePoint Online and Microsoft Lists.
Users with read-only permission can only view comments.
Those with list edit permission can make comments as well as delete comments; editing comments is currently not possible.
Where the Comments will be stored?
Comments are stored in the schema for each list, which is based on the SharePoint storage platform.
Working with SharePoint REST APIs
As comments are stored within the list schema itself and not with list items, it is not possible to fetch comments using $select with /items endpoint. However, you can get the list item comments using below endpoint:
Currently it is not possible to get the actual list item comments value using JSON formatting. But, you can get the count of comments added to list item using [$_CommentCount] which is an internal name of SharePoint list column that returns the count of list item comments.
Any user can delete the list item comments. Currently there is no way to disable deletion of comments.
Maximum characters limit in list comments: 2000 characters
Classic lists that are not yet built to show up in modern user interfaces, like Task lists, will not have this commenting feature.
Commenting on lists in Teams is not available with this release.
Comments are not indexed by Search.
Enable/Disable Comments
Currently it is not possible to disable commenting at the site or list level. Microsoft is working on the new feature which will allow users to enable/disable the comments for individual SharePoint lists. However, Admins can enable/disable this feature at the organization level by changing the CommentsOnListItemsDisabled parameter in the Set-SPOTenant PowerShell cmdlet:
Get a colleague’s attention to an item in a list by @mentioning them within list comments. That person will receive a notification and a link that takes them directly back to the item, to review the comment and take the requested action.
I hope you liked this blog. Give your valuable feedback & suggestions in the comments section below and share this blog with others.
In my previous blog post Creating Colored Folders in SharePoint Online and OneDrive, we saw how to create colored folders in SharePoint online document libraries and OneDrive for Business using user interface (UI) from browser. In this blog post, we’ll explore how to create colorful folders in SharePoint Online using CLI for Microsoft 365, a powerful command-line tool that extends SharePoint’s capabilities.
This new feature of coloring SharePoint & OneDrive folders allows users to assign a color label to folders, providing a visual cue for organization and categorization. However, it’s essential to understand how this works internally and what values are used for coloring folders in SharePoint Online and OneDrive for Business.
Thanks to Tetsuya Kawahara and his PnP PowerShell script sample at Create Colored Folder which explains SharePoint uses the column with internal name as _ColorHex to store the color setting information of folders. The _ColorHex field is a hidden field within SharePoint libraries, and it is not visible by default in standard views. This field stores the color as a numeric value corresponding to each color.
SharePoint supports a predefined set of 16 numerical color values that can be used to color folders. The following table shows the numerical values corresponding to each color:
Color
_ColorHex value
Yellow
Empty or 0
Dark red
1
Dark orange
2
Dark green
3
Dark teal
4
Dark blue
5
Dark purple
6
Dark pink
7
Grey
8
Light red
9
Light orange
10
Light green
11
Light teal
12
Light blue
13
Light purple
14
Light pink
15
We will see how to use these _ColorHex column values to create a new folder in SharePoint online document library using CLI for Microsoft 365 below:
Step 1: Install the CLI for Microsoft 365
Before we can start working with the CLI for Microsoft 365, we need to install it. You can install the CLI for Microsoft 365 by using below NPM commands or by following the instructions on the official documentation page: CLI for Microsoft 365 – Installation.
npm install -g @pnp/cli-microsoft365
You have to use below command if you want to install beta version of CLI for Microsoft 365:
npm install -g @pnp/cli-microsoft365@next
Step 2: Create colored folder using CLI for Microsoft 365
After installation of CLI for Microsoft 365, you can use below CLI for Microsoft 365 script to create a new colored folder in SharePoint online document library using CLI for Microsoft 365:
# Set Variables
$siteUrl = "https://contoso.sharepoint.com/sites/work"
$relativeUrlOfParentFolder = "/ColoredFolders"
$documentLibraryDisplayName = "Colored Folders"
$folderName = "Confidential"
$folderColor = 1
try {
# Get Credentials to connect to SharePoint Online site
$m365Status = m365 status
if ($m365Status -match "Logged Out") {
m365 login
}
# Create the folder
$newFolder = m365 spo folder add --webUrl $siteUrl --parentFolderUrl $relativeUrlOfParentFolder --name $folderName | ConvertFrom-Json
# Get the created folder item
$newFolderItem = m365 spo listitem get --webUrl $siteUrl --listTitle $documentLibraryDisplayName --uniqueId $newFolder.UniqueId | ConvertFrom-Json
# Change the value of the _ColorHex column of the created folder to change the color
m365 spo listitem set --webUrl $siteUrl --listTitle $documentLibraryDisplayName --id $newFolderItem.Id --_ColorHex $folderColor
Write-Host "Folder created and color changed successfully." -ForegroundColor Green
Write-Host "Folder URL: $siteUrl/$relativeUrlOfParentFolder/$folderName" -ForegroundColor Green
}
catch {
Write-Host "An error occurred: $_" -ForegroundColor Red
}
finally {
# Disconnect from SharePoint site
m365 logout
}
Once you run above script successfully and navigate to SharePoint document library, you will see that new colored folder is created inside the SharePoint document library as given below:
Colored folders created in SharePoint Online using CLI for Microsoft 365
Conclusion
Adding color to your folders in SharePoint Online document libraries using CLI for Microsoft 365 is a simple yet effective way to enhance the visual organization and management of your documents. This can improve user experience and help users quickly identify and access the content they need. Experiment with different colors and organizational schemes to find what works best for your team or organization.
In today’s fast-paced work environment, staying up to date with the latest news and updates within an organization is crucial. SharePoint Online offers a powerful feature called Auto News Digest, which automatically aggregates the latest news posts from various SharePoint sites and Organization news sites that are relevant to users and sends an automated email to users.
SharePoint uses Microsoft Graph to determine if the news post is relevant for a user or not. SharePoint sends one email digest per week. By leveraging this feature, users can stay informed without having to manually visit each site individually, saving time and ensuring they don’t miss out on important updates.
In some cases, organizations that already have a high volume of emails may choose to disable SharePoint Auto News Digest feature to minimize the number of additional emails being sent to users. You can use any one of the approaches given below for enabling or disabling auto news digest feature in SharePoint online for all users at tenant level.
Using SharePoint Online PowerShell
Use below SharePoint Online PowerShell script to enable or disable the SharePoint auto news digest feature in SharePoint online at tenant level:
# SharePoint online admin center URL
$adminCenterUrl = Read-Host -Prompt "Enter your SharePoint admin center site URL (e.g https://contoso-admin.sharepoint.com/)"
# Connect to SharePoint online admin center
Connect-SPOService -Url $adminCenterUrl
# Enable Auto News Digest in SharePoint Online
Set-SPOTenant -EnableAutoNewsDigest $true
# Disable Auto News Digest in SharePoint Online
Set-SPOTenant -EnableAutoNewsDigest $false
# Disconnect SharePoint online connection
Disconnect-SPOService
Using PnP PowerShell
You can use below PnP PowerShell script for enabling or disabling the SharePoint auto news digest feature in SharePoint online for all users at tenant level:
# SharePoint online admin center URL
$adminCenterUrl = Read-Host -Prompt "Enter your SharePoint admin center site URL (e.g https://contoso-admin.sharepoint.com/)"
# Connect to SharePoint online admin center
Connect-PnPOnline -Url $adminCenterUrl -Interactive
# Enable Auto News Digest in SharePoint Online
Set-PnPTenant -EnableAutoNewsDigest $true
# Disable Auto News Digest in SharePoint Online
Set-PnPTenant -EnableAutoNewsDigest $false
# Disconnect SharePoint online connection
Disconnect-PnPOnline
Conclusion
SharePoint Auto News Digest is a valuable feature that helps streamline information delivery within organizations. By enabling this feature, SharePoint can automatically compile and deliver news and updates from various SharePoint sites directly to users’ inboxes. Disabling Auto News Digest is also straightforward, allowing organizations to customize their SharePoint experience based on their specific requirements. SharePoint Online PowerShell and PnP PowerShell scripts provide convenient methods to enable or disable Auto News Digest effortlessly, empowering administrators to optimize their SharePoint environment for efficient information sharing.
You can use any one of the approaches given below for enabling or disabling the Social Bar (Like, No. of Comments, Views, Save for later) for individual SharePoint online sites.
Using SharePoint Online PowerShell
Use below SharePoint Online PowerShell script to enable or disable the social bar from site pages for specific SharePoint online modern experience site:
# SharePoint online admin center URL
$adminCenterUrl = Read-Host -Prompt "Enter your SharePoint online admin center URL (e.g https://contoso-admin.sharepoint.com/)"
# Connect to SharePoint online admin center
Connect-SPOService -Url $adminCenterUrl
# SharePoint online site URL
$siteUrl = Read-Host -Prompt "Enter your SharePoint site URL (e.g https://contoso.sharepoint.com/sites/work)"
# Disable the social bar from SharePoint online site pages
Set-SPOSite -Identity $siteUrl -SocialBarOnSitePagesDisabled $true
# Enable the social bar on SharePoint online site pages
Set-SPOSite -Identity $siteUrl -SocialBarOnSitePagesDisabled $false
# Disconnect SharePoint online connection
Disconnect-SPOService
Using PnP PowerShell
You can use below PnP PowerShell script to show or hide the social bar from SharePoint online modern experience site pages for individual SharePoint site:
# SharePoint online site URL
$siteUrl = Read-Host -Prompt "Enter your SharePoint site URL (e.g https://contoso.sharepoint.com/sites/work)"
# Connect to SharePoint online site
Connect-PnPOnline -Url $siteUrl -Interactive
# Hide the social bar from SharePoint online modern site pages
Set-PnPSite -SocialBarOnSitePagesDisabled $true
# Show the social bar on SharePoint online modern site pages
Set-PnPSite -SocialBarOnSitePagesDisabled $false
# Disconnect SharePoint online connection
Disconnect-PnPOnline
Using CLI for Microsoft 365
Use below CLI for Microsoft script to show or hide the social bar from SharePoint online modern experience site pages for individual SharePoint site:
# SharePoint online site URL
$siteUrl = Read-Host -Prompt "Enter your SharePoint site URL (e.g https://contoso.sharepoint.com/sites/work)"
# Connect to SharePoint online tenant
$m365Status = m365 status
if ($m365Status -match "Logged Out") {
m365 login
}
# Hide the social bar from SharePoint online modern site pages
m365 spo site set --url $siteUrl --socialBarOnSitePagesDisabled true
# Show the social bar on SharePoint online modern site pages
m365 spo site set --url $siteUrl --socialBarOnSitePagesDisabled false
# Disconnect SharePoint online connection
m365 logout
Conclusion
By using the PowerShell scripts given in this blog post, you can enable or disable social bar features from SharePoint online modern site pages for specific SharePoint online sites.
SharePoint Online provides various social features in modern experience SharePoint sites. One of the features available for SharePoint site pages is the social bar (Like, No. of Comments, Views, Save for later), which is situated at the bottom of site pages. Social bar allows users to engage with page content by liking and saving pages for later reference. Social bar also shows the number of page views and comments on modern site pages.
However, organizations may have specific requirements that necessitate enabling or disabling the social bar on SharePoint site pages. Unfortunately, there are no settings available for enabling/disabling social bar using SharePoint user interface. In this blog post, we will explore how to achieve this at SharePoint tenant level using SharePoint Online PowerShell, PnP PowerShell and CLI for Microsoft 365 scripts.
Using SharePoint Online PowerShell
Use below SharePoint Online PowerShell script to enable or disable the social bar from site pages for all SharePoint sites in the tenant:
# SharePoint online admin center URL
$adminCenterUrl = "https://contoso-admin.sharepoint.com/"
# Connect to SharePoint online admin center
Connect-SPOService -Url $adminCenterUrl
# Disable the social bar from SharePoint online site pages
Set-SPOTenant -SocialBarOnSitePagesDisabled $true
# Enable the social bar on SharePoint online site pages
Set-SPOTenant -SocialBarOnSitePagesDisabled $false
Using PnP PowerShell
You can use below PnP PowerShell script to show or hide the social bar from SharePoint online modern experience site pages:
# SharePoint online admin center URL
$adminCenterUrl = "https://contoso-admin.sharepoint.com/"
# Connect to SharePoint online admin center
Connect-PnPOnline -Url $adminCenterUrl -Interactive
# Show the social bar on SharePoint online modern site pages
Set-PnPTenant -SocialBarOnSitePagesDisabled $false
# Hide the social bar from SharePoint online modern site pages
Set-PnPTenant -SocialBarOnSitePagesDisabled $true
Using CLI for Microsoft 365
Use below CLI for Microsoft 365 script to enable or disable the Social Bar (like, No. of comments, views, Save for later) in SharePoint online at tenant level:
# Get Credentials to connect
$m365Status = m365 status
if ($m365Status -match "Logged Out") {
m365 login
}
# Disable the social bar from SharePoint online site pages
m365 spo tenant settings set --SocialBarOnSitePagesDisabled true
# Enable the social bar on SharePoint online site pages
m365 spo tenant settings set --SocialBarOnSitePagesDisabled false
Conclusion
Enabling or disabling the social bar on site pages in SharePoint Online can be achieved using SharePoint Online PowerShell, PnP PowerShell or CLI for Microsoft 365 scripts. By following the steps outlined in this blog post, you can customize the user experience and align it with your organization’s specific requirements. Whether you want to encourage user engagement or disable social features for certain scenarios, these PowerShell scripts provide the flexibility to control the social bar’s presence on SharePoint online modern site pages.
SharePoint Online provides a modernized and responsive user interface that offers improved collaboration, customization, and integration capabilities. It provides a clean and intuitive design, responsive layouts, and enhanced mobile support. Modern SharePoint sites include modern lists and libraries, modern web parts, and modern pages.
On modern SharePoint list and library pages, there’s a link in the lower left of the page below quick launch (left navigation) that says Return to classic SharePoint. This link allows users who are working in the SharePoint modern experience to switch the current list or document library to classic experience. On the classic page, there’s a corresponding link that says Exit classic experience which reverts the current list or document library back to modern experience.
You may want to hide Return to classic SharePoint link from list and library pages to promote the adoption & utilization of the modern experience and have consistent modern user experience across the SharePoint site.
Luckily, as a tenant administrator you have control to show or hide these links from SharePoint online modern experience using one of the ways shown below:
Using SharePoint Online PowerShell
Use below SharePoint Online PowerShell script to enable or disable the Return to classic SharePoint and Exit classic experience links from SharePoint list and document library pages:
# SharePoint online admin center URL
$adminCenterUrl = "https://contoso-admin.sharepoint.com/"
# Connect to SharePoint online admin center
Connect-SPOService -Url $adminCenterUrl
# Enable Return to classic SharePoint and Exit classic experience links
Set-SPOTenant -DisableBackToClassic $false
# Disable Return to classic SharePoint and Exit classic experience links
Set-SPOTenant -DisableBackToClassic $true
Using PnP PowerShell
You can use below PnP PowerShell script to show or hide the “Return to classic SharePoint” and “Exit classic experience” links from SharePoint online modern experience list and document library pages:
# SharePoint online admin center URL
$adminCenterUrl = "https://contoso-admin.sharepoint.com/"
# Connect to SharePoint online admin center
Connect-PnPOnline -Url $adminCenterUrl -Interactive
# Show Return to classic SharePoint and Exit classic experience links
Set-PnPTenant -DisableBackToClassic $false
# Hide Return to classic SharePoint and Exit classic experience links
Set-PnPTenant -DisableBackToClassic $true
Conclusion
Enabling or disabling the “Return to Classic SharePoint” and “Exit classic experience” links in SharePoint Online can be accomplished using SharePoint Online PowerShell or PnP PowerShell scripts. By following the steps outlined in this blog post, you can manage the user experience and tailor it to your organization’s specific requirements. Whether you embrace the modern SharePoint experience or occasionally need access to classic features, these PowerShell scripts provide the flexibility to adapt SharePoint Online to your needs.
SharePoint Online is a powerful collaboration and content management platform that allows organizations to create and manage sites for various purposes. One of the key features that enhances site design and improves user experience is the use of Page Templates. In this blog post, we will delve into what are page templates in SharePoint online and how to set a default page template for a SharePoint site.
What are Page Templates in SharePoint?
Page templates in SharePoint Online are pre-designed layouts or structures that provide a consistent and standardized format for creating site pages within a site. They serve as a starting point for designing and organizing content on SharePoint pages, ensuring a cohesive look and feel across the site.
Page templates can include a variety of elements such as placeholders for text, images, web parts, page sections, and more. By using page templates, users can quickly create new pages with a predefined structure and layout, saving time and effort while maintaining visual consistency.
Setting a Default Page Template for a SharePoint Site
When users try to create new site pages from SharePoint site home page, the default selected template in the Page Templates pane is Blank. If users don’t select a different template, the blank template will be used for their new page.
If you prefer to have another custom page template be the default selection for your SharePoint site while creating new site pages, follow one of the methods given below:
Using SharePoint User Interface
Follow below steps to set a default page template for your SharePoint online site from SharePoint UI:
1. Go to home page of your SharePoint online site.
2. Click on New from page command bar and select Page:
Open Page templates pane from SharePoint online site home page
3. Click on vertical ellipses at the bottom right side of the template you want, and then select Set default selection:
Set default selection of page template for SharePoint site
4. Click OK from Changing default selection confirmation popup.
Note: When you change the default selection in the page templates pane, it will be changed for all users in the SharePoint site.
Using PnP PowerShell
You can use below PnP PowerShell script to set a page template as default page template for SharePoint online site:
# SharePoint online site URL
$siteUrl = Read-Host -Prompt "Enter your SharePoint site URL (e.g https://contoso.sharepoint.com/sites/work)"
# Connect to SharePoint online site
Connect-PnPOnline -Url $siteUrl -Interactive
# Get page template details and Unique ID
$page = Get-PnPFile -Url "/sites/work/SitePages/Templates/PlainHeaderNoComments.aspx" -AsListItem
# Set a page template as default page template for SharePoint online site
Set-PnPPropertyBagValue -Key DefaultNewPageTemplateId -Value $page["UniqueId"]
# Disconnect SharePoint online connection
Disconnect-PnPOnline
You may get error like below while executing above PnP PowerShell script if custom scripts are not enabled for your SharePoint site:
Set-PnPPropertyBagValue: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) Site might have NoScript enabled, this prevents setting some property bag values.
Use below CLI for Microsoft 365 script to set a page template as default page template for SharePoint online site:
# Get Credentials to connect
$m365Status = m365 status
if ($m365Status -match "Logged Out") {
m365 login
}
# SharePoint online site URL
$siteUrl = Read-Host -Prompt "Enter your SharePoint site URL (e.g https://contoso.sharepoint.com/sites/work)"
# Get page template details and Unique ID
$page = m365 spo file get --webUrl $siteUrl --url '/sites/work/SitePages/Templates/PlainHeaderNoComments.aspx' | ConvertFrom-Json
# Set a page template as default page template for SharePoint online site
m365 spo propertybag set --webUrl $siteUrl --key DefaultNewPageTemplateId --value $page.UniqueId
If custom scripts are not enabled for your SharePoint site, above CLI for Microsoft 365 script will throw error like:
Error: Site has NoScript enabled, and setting property bag values is not supported
Page templates in SharePoint online provide a valuable tool for enhancing site design and improving user experience. By setting a default page template, organizations can establish a consistent and standardized format for creating web pages within their SharePoint sites. This not only saves time but also ensures a cohesive and professional look across the site. By leveraging page templates, organizations can effectively showcase their content while maintaining their branding and style guidelines.
SharePoint online is a powerful platform that allows users to create and manage websites and content, collaborate with others, and more. However, SharePoint out-of-the-box features may not always meet the specific needs of your organization.
Fortunately, SharePoint online allows the use of custom scripts, which can be used to enhance the platform’s functionality and customize it to your specific needs.
When you allow the use of custom scripts in SharePoint online sites, users gain access to a wide range of features and functionalities. Here are some of the key capabilities that become available:
Web Parts: Users can use classic experience web parts like Script Editor, Content Editor (and lot more) using which they can create custom web parts using client-side scripting languages like JavaScript or TypeScript.
Use of Save Site as Template, Save document library as template, etc. features in SharePoint.
Use of Solution Gallery, Theme Gallery, Sandbox solutions, HTML Field Security, etc. settings in SharePoint sites.
Uploading files types that are blocked by default like .asmx.ascx.aspx.htc.jar.master.swf.xap.xsf
Let’s see how you can allow or prevent use of custom scripts in SharePoint Online sites using different PowerShell tools:
Using SharePoint Online PowerShell
Use below SharePoint Online PowerShell script to check if custom scripts are enabled or disabled for a SharePoint online site and then to allow use of custom scripts for specified SharePoint online site:
# SharePoint online admin center URL
$adminCenterUrl = "https://contoso-admin.sharepoint.com/"
# SharePoint online site URL
$siteUrl = "https://contoso.sharepoint.com/sites/SPConnect"
# Connect to SharePoint online admin center
Connect-SPOService -Url $adminCenterUrl
# Allow custom scripts on SharePoint online site
Set-SPOSite $siteUrl -DenyAddAndCustomizePages 0
# Verify that custom scripts are enabled on SharePoint online site
Get-SPOSite $siteUrl | select DenyAddAndCustomizePages
Using PnP PowerShell
You can use below PnP PowerShell script to allow or prevent use of custom scripts in SharePoint online site:
# SharePoint online site URL
$siteUrl = "https://contoso.sharepoint.com/sites/SPConnect"
# Connect to SharePoint online site
Connect-PnPOnline -Url $siteUrl -Interactive
# Allow custom scripts on SharePoint online site
Set-PnPSite -NoScriptSite $false
# Prevent custom scripts on SharePoint online site
Set-PnPSite -NoScriptSite $true
Using CLI For Microsoft 365
Use below CLI for Microsoft 365 script to allow use of custom scripts in SharePoint online site collection:
# SharePoint online site URL
$siteUrl = "https://contoso.sharepoint.com/sites/SPConnect"
# Connect to SharePoint online tenant
$m365Status = m365 status
if ($m365Status -match "Logged Out") {
m365 login
}
# Allow custom scripts on SharePoint online site collection
m365 spo site set --url $siteUrl --noScriptSite $false
Conclusion
Enabling custom script support for SharePoint online sites can enhance the platform’s functionality and enable users to customize site to their specific needs. However, it’s important to carefully consider the potential security risks before enabling this feature, check: security considerations of allowing custom scripts in SharePoint.