SharePoint Online: How to Implement Custom 404 Page Not Found Error Page?

February 28, 2019    , ,
Requirement: Implement a custom page not found error page in SharePoint Online. SharePoint Online: How to Add custom 404 page not found error page SharePoint Online comes with a default "Page not found" error page in "Pages" library in publishing Sites (http://crescent.sharepoint.com/Pages/PageNotFoundError.aspx) which works automatically when a user hits a non-existent URL. This error page works for the entire site collection. You can further customize this page, located at "/Pages/PageNotFoundError.aspx" to add some descriptive text, images and branding. In some cases, You may need to create your own 404 page and here are the steps: Step 1: Add New Page Not Found Error Page in SharePoint Online:  We can create our own page and set as a page not found error page for any SharePoint Online site collection. Here are the steps to create a custom 404 page not found error page: Go to Site Contents >> Pick Pages Library and Create New >&g
SharePoint Online: How to Implement Custom 404 Page Not Found Error Page? SharePoint Online: How to Implement Custom 404 Page Not Found Error Page? Reviewed by Salaudeen Rajack on February 28, 2019 Rating: 5

SharePoint Online: How to Add a Custom Refiner to Refinement Panel in Search Results?

February 28, 2019    ,
Requirement: Create Search Refiners in SharePoint Online. How to Add a Custom Column in Search Refiner in SharePoint Online? Refinement Web Part in SharePoint Online search results page helps us to narrow down the search results. By default, the refinement panel has Result type, Author and Modified Date columns in it. In my case, We have a document library with "IC Number" and "Project Name" Columns, which I would like to show in the Refinement Panel on the Search Results. Make sure your document library is already crawled by search, so that we have crawled properties for metadata columns in the document library created. Here are the steps to add a custom refiner to SharePoint Online Search results: In Short: Map a crawled property of list column to any one of the Built-it "RefinableString..." managed property and Edit the Refinement web part in Search Results page to include the Metadata property in Refiners! Step 1: Map Crawled Property wit
SharePoint Online: How to Add a Custom Refiner to Refinement Panel in Search Results? SharePoint Online: How to Add a Custom Refiner to Refinement Panel in Search Results? Reviewed by Salaudeen Rajack on February 28, 2019 Rating: 5

SharePoint Online: Add Metadata to Search Results Page

February 26, 2019    ,
Requirement: Add Metadata to SharePoint Online Search Results SharePoint Online: How to Show Metadata in Search Results? I've a requirement to add "Project Name" column value of a document in search results. Followed these steps to add metadata properties (or custom columns) to search results page of SharePoint Online: Activate Publishing Feature both at Site collection features and Site Features page. Get the Managed Property name for your list column. You can verify it from Site settings >> Click on "Search schema "under "Site Collection Administration" section. Use search to enter the name of your property, verify its mapping. In my case, I've "ProjectName" Site column added to my list and its respective managed property was created automatically as: "ProjectNameOWSTEXT". Open the site collection in SharePoint Designer, Navigate to folder "Search" folder under "Display Templates". E.g. https:/
SharePoint Online: Add Metadata to Search Results Page SharePoint Online: Add Metadata to Search Results Page Reviewed by Salaudeen Rajack on February 26, 2019 Rating: 5

SharePoint Online: Restore Deleted Items from Recycle Bin using PowerShell

February 21, 2019    , , , ,
Requirement: Restore Items from recycle bin in SharePoint Online using PowerShell How to Restore Items from Recycle bin in SharePoint Online? To restore Items from SharePoint Online recycle bin, do the following: Navigate to the SharePoint Online site where you want to restore deleted items from the recycle bin.  Click on Settings gear >> Choose "Site Contents" link from the site settings menu. On the Site Contents page, click the Recycle Bin link, located to the top-right section. You will be navigated to the Recycle Bin page for the site (not site collection!), which lists all items in the recycle bin. To restore items from the site recycle bin, On the Recycle Bin page, check the box for each Item you want to restore and click the "Restore Selection" link. The selected items are restored, and the Recycle Bin page is refreshed to reflect the change. Restore deleted items from Site Collection Recycle bin If you have Site collection administ
SharePoint Online: Restore Deleted Items from Recycle Bin using PowerShell SharePoint Online: Restore Deleted Items from Recycle Bin using PowerShell Reviewed by Salaudeen Rajack on February 21, 2019 Rating: 5

SharePoint Online: Filter List Items based on Created or Modifed Date using PowerShell

February 21, 2019    , , , ,
Requirement: Filter and Get List Items based on its created or modified date values in SharePoint Online using PowerShell. How to Filter and Get List Items Created in the Past 30 Days using PowerShell? Here is the PowerShell example to get list items created in the past 30 days in SharePoint Online list. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Variables $SiteURL = "https://crescent.sharepoint.com/sites/marketing" $ListName = "Documents" Try { #Get Credentials to connect $Cred= Get-Credential #Setup the context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $Ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($C
SharePoint Online: Filter List Items based on Created or Modifed Date using PowerShell SharePoint Online: Filter List Items based on Created or Modifed Date using PowerShell Reviewed by Salaudeen Rajack on February 21, 2019 Rating: 5

Import-Module : Could not load type 'Microsoft.SharePoint.Administration.DesignPackageType' from assembly 'Microsoft.SharePoint.Client, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'

February 21, 2019    , ,
Problem: When trying to import PowerShell module for SharePoint Online with "Import-Module -Name Microsoft.Online.SharePoint.PowerShell", got an error message: PS C:\> Import-Module -Name Microsoft.Online.SharePoint.PowerShell                  Import-Module : Could not load type 'Microsoft.SharePoint.Administration.DesignPackageType' from assembly 'Microsoft.SharePoint.Client, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'. At line:1 char:1 + Import-Module -Name Microsoft.Online.SharePoint.PowerShell + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : NotSpecified: (:) [Import-Module], TypeLoadException     + FullyQualifiedErrorId : System.TypeLoadException,Microsoft.PowerShell.Command    s.ImportModuleCommand PS C:\> Solution: This is due to DLL Version mismatch. To resolve the issue, follow these steps: Uninstall SharePoint Online Management Shell and SharePoint Online Clie
Import-Module : Could not load type 'Microsoft.SharePoint.Administration.DesignPackageType' from assembly 'Microsoft.SharePoint.Client, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' Import-Module : Could not load type  'Microsoft.SharePoint.Administration.DesignPackageType' from assembly  'Microsoft.SharePoint.Client, Version=16.0.0.0, Culture=neutral,  PublicKeyToken=71e9bce111e9429c' Reviewed by Salaudeen Rajack on February 21, 2019 Rating: 5

SharePoint Online: How to Stop Inheriting Permission and Setup Unique Access to a Subsite?

February 20, 2019    , , , , ,
Requirement: Break permission inheritance of a Subsite in SharePoint Online. How to Break Subsite Permission Inheritance in SharePoint Online? When we create a new subsite in SharePoint Online, we have an option to set its permission: whether the subsite should inherit permissions from its parent site or it should have unique permissions. In case, you have a requirement to change subsite permission inheritance after the site has been created, we can change its permission settings: Navigate to the subsite in which you need to change permission inheritance. Click on Settings gear and then select "Site Settings" from the settings menu. On the Site Settings page, click on the "Site Permissions" link under the "Users and Permissions" section. On the site permissions page, you'll get a message saying: "This web site inherits permissions from its parent. (Parent Site Title)", If the site inherits permissions from its parent. To configure
SharePoint Online: How to Stop Inheriting Permission and Setup Unique Access to a Subsite? SharePoint Online: How to Stop Inheriting Permission and Setup Unique Access to a Subsite? Reviewed by Salaudeen Rajack on February 20, 2019 Rating: 5

SharePoint Online: Copy List or Document Library to Another Site using PnP PowerShell

February 19, 2019    , , , , ,
Requirement: Copy Document Library to another site using PowerShell SharePoint Online: Copy Document Library to Another site using PnP PowerShell PnP provisioning engine lets us to copy site objects such as lists and libraries, site columns, content types, composed looks, pages, etc. We can export existing customization to XML file and use it as a template to create new objects from it. We can copy lists and libraries between SharePoint Online site collections with the help of PnP Provisioning engine. Here is the PowerShell script: Step 1: Get the List Schema from Source Site With PnP provisioning engine, we need to extract the list schema first: #Config Variables $SiteURL = "https://crescent.sharepoint.com/sites/marketing/" $ListName = "Project Tasks" $TemplateFile = "C:\Temp\ListSchema.xml" #Connect to PNP Online Connect-PnPOnline -Url $SiteURL -UseWebLogin #Get the List schema as Template and export to a File $Templates = Get-PnPProvisioningT
SharePoint Online: Copy List or Document Library to Another Site using PnP PowerShell SharePoint Online: Copy List or Document Library to Another Site using PnP PowerShell Reviewed by Salaudeen Rajack on February 19, 2019 Rating: 5

SharePoint Online: Remove Unique Permissions from All Folders in a Document Library using PowerShell

February 19, 2019    , , , , ,
Requirement:  Remove unique permissions from all folders-sub-folders in a SharePoint Online document library. How to Delete Unique Permissions of a Folder in SharePoint Online? To remove unique permissions from a SharePoint Online Folder, Follow these steps: Navigate to your SharePoint Online document library where the target folder is located.  Right click on Folder, choose "Details" from the context menu. This opens the details pane, Click on "Manage Access" and then "Advanced" links. This takes you to the "Advanced Permissions" page. If the folder is using unique permissions, you'll get "This folder has unique permissions." message. Now, from the ribbon, Click on "Delete Unique Permissions" button and confirm the prompt: "You are about to inherit permissions from the parent folder or document library. Any custom permissions will be lost." This removes all unique permissions of the folder and inherits
SharePoint Online: Remove Unique Permissions from All Folders in a Document Library using PowerShell SharePoint Online: Remove Unique Permissions from All Folders in a Document Library using PowerShell Reviewed by Salaudeen Rajack on February 19, 2019 Rating: 5

SharePoint Online: Export Group Members to Excel

February 18, 2019    , , ,
Requirement: Export SharePoint Online group members to Excel How to Export SharePoint Online Group Members to Excel? Have you ever wanted to export all members of a SharePoint Online group to Excel? Well, here is how you can do that: Login to Site Collection >> Navigate to Site Settings Click on "People and Groups" link and pick the desired group to get group members . Now the URL should look like: Https://crescent.sharepoint.com/sites/marketing/_layouts/15/people.aspx?MembershipGroupId=4 , We need the ID of the group to retrieve all members of a SharePoint Online group. The value of "MembershipGroupId" parameter is the ID of the group. In this case, its : 4 Now frame the URL: (Replace YourTenant and GroupID values with yours) https://YOURTENANT.sharepoint.com/_api/Web/SiteGroups/getbyid(GROUPID)/Users Open Microsoft Excel >> under "Data" tab, Click "From OData Data Feed" link. Enter the URL you framed and click on "Nex
SharePoint Online: Export Group Members to Excel SharePoint Online: Export Group Members to Excel Reviewed by Salaudeen Rajack on February 18, 2019 Rating: 5

SharePoint Online: Move Users from One Group to Another

February 18, 2019    , , , ,
Requirement: Move users from one group to another in SharePoint Online. How to Move Users Between SharePoint Online Groups? Well, there is no direct way to copy or move users between SharePoint Online groups. But you can achieve it by following below steps: Click on Settings gear >> Site Settings Click on "People and Groups" under "Users and Permissions" group Select the Source group name from left navigation >> Select All Users by ticking the checkbox in the header >> Click on "E-mail Users" from "Actions" menu. This opens the default Email client with all users of the group. Copy them!  Navigate to the destination group in SharePoint Online site>> Click on "Add users and paste those copied Email. The above method could be relatively simpler when you have to copy or move few users between SharePoint groups. Wouldn't it be better to use the scripted way to copy multiple users in bulk? SharePoint Onl
SharePoint Online: Move Users from One Group to Another SharePoint Online: Move Users from One Group to Another Reviewed by Salaudeen Rajack on February 18, 2019 Rating: 5

Get All Document Libraries in SharePoint Online using PnP PowerShell

February 16, 2019    , , ,
Requirement: Get all document libraries in SharePoint Online using PowerShell PnP PnP PowerShell to Get All Document Libraries in SharePoint Online  Document libraries can be filtered from Lists collection by either base template or base type properties. Here is how: #Set Variables $SiteURL = "https://crescent.sharepoint.com/sites/marketing" #Connect to PNP Online Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential) #-UseWebLogin #Get all document libraries - Exclude Hidden Libraries $DocumentLibraries = Get-PnPList | Where-Object {$_.BaseTemplate -eq 101 -and $_.Hidden -eq $false} #Or $_.BaseType -eq "DocumentLibrary" #Get Document Libraries Name, Default URL and Number of Items $DocumentLibraries | Select Title, DefaultViewURL, ItemCount This PowerShell script gets all document libraries from the given site URL Here is my another script to get all document libraries in SharePoint Online site using CSOM PowerShell:  SharePoint Online: PowerShel
Get All Document Libraries in SharePoint Online using PnP PowerShell Get All Document Libraries in SharePoint Online using PnP PowerShell Reviewed by Salaudeen Rajack on February 16, 2019 Rating: 5

Set SharePoint Online Site to Read Only using PowerShell

February 15, 2019    , , ,
Requirement: Set SharePoint Online site to read only using PowerShell. How to make SharePoint Online site read only?  To make SharePoint online site collection to read only, use this PowerShell script in SharePoint Online Management Shell. #Set Parameters $AdminCenterURL="https://crescent-admin.sharepoint.com" $SiteURL = "https://crescent.sharepoint.com/sites/marketing" #Connect to SharePoint Online Connect-SPOService -Url $AdminCenterURL -Credential (Get-Credential) #PowerShell to set sharepoint online site to read only Set-SPOSite -Identity $SiteURL -LockState ReadOnly Once the execution of the above script is completed, you'll find a message appearing on top of the site: "SharePoint sites are read-only right now while we do some maintenance. We apologize for the inconvenience." To unlock the site collection, use: #Unlock site from read only mode Set-SPOSite -Identity $SiteURL -LockState Unlock Here is my another post on making site r
Set SharePoint Online Site to Read Only using PowerShell Set SharePoint Online Site to Read Only using PowerShell Reviewed by Salaudeen Rajack on February 15, 2019 Rating: 5

SharePoint Online: Get Document Library Permissions and Export to CSV using PnP PowerShell

February 15, 2019    , , , , ,
Requirement: SharePoint Online PowerShell to Get Document Library Permissions. PnP PowerShell to Export Document Library Permissions in SharePoint Online: This PowerShell script exports all permissions of a SharePoint Online document library. # Parameters $SiteUrl = "https://crescent.sharepoint.com/sites/ICDocuments" $ReportOutput = "C:\Temp\LibraryPermissions.csv" $LibraryName = "IC Documents" #Connect to to PnP Online Connect-PnPOnline -Url $SiteUrl -UseWebLogin # -Credentials (Get-Credential) # Get the document library $Library = Get-PnpList -Identity $LibraryName -Includes RoleAssignments # Get all users and groups who has access $RoleAssignments = $Library.RoleAssignments $PermissionCollection = @() Foreach ($RoleAssignment in $RoleAssignments) { #Get the Permission Levels assigned and Member Get-PnPProperty -ClientObject $roleAssignment -Property RoleDefinitionBindings, Member #Get the Principal Type: User, SP Group, AD Group
SharePoint Online: Get Document Library Permissions and Export to CSV using PnP PowerShell SharePoint Online: Get Document Library Permissions and Export to CSV using PnP PowerShell Reviewed by Salaudeen Rajack on February 15, 2019 Rating: 5

SharePoint Online: Get List Item Count using PowerShell

February 14, 2019    , , , , , ,
Requirement: Get list item count in SharePoint Online using PowerShell How to Get List Items Count in SharePoint Online? The "Site Contents" page in SharePoint Online gives you all lists and the number of items in each. E.g. https://YourTenant.sharepoint.com/_layouts/Viewlsts.aspx SharePoint Online: PowerShell to Get List Item Count Use this CSOM PowerShell script to find the number of items in a SharePoint Online list. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Config Parameters $SiteURL= "https://crescent.sharepoint.com/sites/marketing" $ListName = "Documents" #Setup Credentials to connect $Cred = Get-Credential Try { #Setup the context $Ctx = New-Object Micr
SharePoint Online: Get List Item Count using PowerShell SharePoint Online: Get List Item Count using PowerShell Reviewed by Salaudeen Rajack on February 14, 2019 Rating: 5

How to Disable Footer in SharePoint Online Communication Sites?

February 12, 2019    , ,
Requirement:  Disable Footer in SharePoint Online Communication Sites How to Hide Footer in Communication Sites in SharePoint Online? Although footer section is handy, you may have to disable footer in some scenarios. Use this PowerShell script to hide Footer from communications site #Variable $SiteURL= "https://crescent.sharepoint.com/sites/corporate" #Connect to PnP Online Connect-PnPOnline $SiteURL -Credentials (Get-Credential) #Get the Web $Web = Get-PnPWeb #Disable Footer for Root Web $web.FooterEnabled = $False $Web.Update() Invoke-PnPQuery
How to Disable Footer in SharePoint Online Communication Sites? How to Disable Footer in SharePoint Online Communication Sites? Reviewed by Salaudeen Rajack on February 12, 2019 Rating: 5

SharePoint Online: How to Disable Social Bar (Like, Comment, Views, Save for later) in Modern Site Pages?

February 12, 2019    , ,
Requirement: Disable Social Bar links (Like, Comment, Views, Save for later) in SharePoint Online Modern Site Pages PowerShell to Hide Social Bar Links in SharePoint Online Site Collection: The Social Bar is a new feature in SharePoint Online modern pages, that lets user to like, comment, and see the number of views. To disable social bar, Run this PowerShell script in SharePoint Online Management Shell. Make sure you set the parameters accordingly. #Set Parameters $AdminCenterURL="https://crescent-admin.sharepoint.com" $SiteURL = "https://crescent.sharepoint.com/sites/marketing" #Connect to SharePoint Online Connect-SPOService -Url $AdminCenterURL -Credential (Get-Credential) #Disable Social Bar on Site Pages Set-SPOSite -Identity $SiteURL -SocialBarOnSitePagesDisabled $True Similarly, To disable SharePoint Online Social bar at Tenant level, use: Set-SPOTenant -SocialBarOnSitePagesDisabled $true Before: After: Here is my another post on disabli
SharePoint Online: How to Disable Social Bar (Like, Comment, Views, Save for later) in Modern Site Pages? SharePoint Online: How to Disable Social Bar (Like, Comment, Views, Save for later) in Modern Site Pages? Reviewed by Salaudeen Rajack on February 12, 2019 Rating: 5

How to Show Search Refiners Count in SharePoint Online?

February 03, 2019    ,
Requirement: Show refiners count in SharePoint Online Search SharePoint Online:Search Refiners Count By default, SharePoint Online search refiners don't show results count. To enable refiners count you need to manually modify the display template file used by the search refiner web part. It's quite easy,  we just need to change a flag under the display template. Here is how: Open your SharePoint Online site in SharePoint Designer (or Map the "Display Templates" Folder as network drive). Navigate to the Path: https://Tenant.sharepoint.com/sites/YOURSITE/_catalogs/masterpage/Display Templates/Filters/ Create a backup copy of the "Filter_Default.html" display template and edit the "Filter_Default.html" in Advanced Mode. You can also create a copy and rename display template and then apply the template to the search refiner web part. Search for: ShowCounts: false , and replace the flag with ShowCounts: true Save your changes. If you are u
How to Show Search Refiners Count in SharePoint Online? How to Show Search Refiners Count in SharePoint Online? Reviewed by Salaudeen Rajack on February 03, 2019 Rating: 5

SharePoint Online: How to Set Permissions to Add But Not Delete?

February 01, 2019    , ,
Requirement: Set permission to add but not delete in SharePoint site or list. How to Set Permissions to add but not delete in SharePoint? We've a requirement to configure permissions to add items but not delete in a SharePoint Online site. So, lets see how we can restrict permissions on a list or library for a certain group of users so that those users can add items to the list or library, but they can't delete items (not even their own!). Step 1: Create a permission level in SharePoint Online Contribute without delete permission level is often required in real world scenarios. Let's say, You want your users to be able to add files to the library but not delete files from the library. To achieve this, we can simply copy the "Contribute" permission level and take off "Delete Items" permission from it! To create new permission level in SharePoint Online, Follow these steps: Login to your SharePoint Online site collection as Administrator >&
SharePoint Online: How to Set Permissions to Add But Not Delete? SharePoint Online: How to Set Permissions to Add But Not Delete? Reviewed by Salaudeen Rajack on February 01, 2019 Rating: 5
Powered by Blogger.