Skip to main content

Posts

Showing posts with the label O365

SharePoint Online: Disable Top Navigation on a Teams Connected Site Using PnP PowerShell

If you've tried to disable the top navigation bar on a modern Teams-connected SharePoint site, you've probably noticed there's no obvious setting to do it. The UI doesn't give you a toggle. Site settings don't have the option. And the PowerShell properties you'd expect to work simply don't. This post covers exactly that scenario - what I tried, why each approach failed, and the single PnP PowerShell command that actually works. The Problem On a modern Teams-connected SharePoint site (template GROUP#0 ), the top navigation bar is visible by default. Unlike classic SharePoint publishing sites, there is no built-in UI option in site settings or site collection settings to disable it. If you want to hide the top navigation bar - for example because the site is associated to a hub that already provides navigation, making the site's own top nav redundant - you need to do it programmatically. What Didn't Work for Me 1. Site Settings and...

We're having trouble generating a transcript and captions right now. Try again in a bit.

 We're having trouble generating a transcript and captions right now. Try again in a bit. We received this error while trying to auto-generate captions for a video in SharePoint online. The error didn't provide any clue as to why this happens but then we noticed that the video was uploaded to Styles Library for some reason and once we moved that to another Document Library captions started working fine. Why this happens with videos in Styles Library we don't know, I couldn't find any relevant documents or articles but Styles Library isn't meant to be storing business content. Glad we found the solution and a simple solution!

SharePoint Online - Export Term Store data

We had a requirement to export Terms from a particular Term Store Group in our SPO tenant but I couldn't find a script that goes in to Level 2 and Level 3 Terms or if there is one out there I couldn't find it. I checked many forums and blogs and thanks to all those contributors who inspired me to come up with this script. This isn't perfect by any means and I would like to improve and clean this up a bit but I'm sharing this here so its documented where I can fix this later and also probably help someone. The script will export the data in hierarchical form in a .csv file.   # Tenant url $url="<enter your SharePoint admin url>" # Term Group names as an array $groups = @("")  # location of CSV file $FilePath="Terms.csv"  # Variable to collect all data and export to CSV $results = New-Object System.Collections.ArrayList # Function to iterate through Term store function Get-TermsAsCSV {           try       {  ...

SharePoint Online (SPO) List Items Read-only

Issue : I came across a situation where certain items in a SPO List was read only and that too for just one user and this user is also a Site Owner with Full Control on the List and Site. It was a strange situation as other users were able to edit those List items - the affected user tried Data Grid option as well but couldn't edit. This was similar to item level permission set on the List but in this case it wasn't set. Resolution : After some external support it was found that this was caused by List Sync, once the sync was stopped the items were editable. Here are the steps: 1. Go to their List home page (App menu in the upper right of SharePoint -> All Apps -> Lists). 2. Find the list you'd like to stop syncing. 3. Click the ... button pictured below. 4. If the list is syncing, there will be a menu option for "Stop Syncing". Click on stop syncing to stop the syncing. If you want to disable sync for all users for a particular List then: Navigate to List S...

Change SharePoint/O365 MasterPage using JSOM

Here is one way to change the master page of a SharePoint site using JSOM, I have tested this in O365 site but it should work with on-prem version of SharePoint as well. This code can be run on a script editor webpart and it works on the click of a html button control. <script src="/_layouts/15/SP.Runtime.js" type="text/javascript"></script> <script src="/_layouts/15/SP.js" type="text/javascript"></script> <script type="text/javascript"> function ChangeMasterPage() { var customMasterPage = "/_catalogs/masterpage/Custom.master"; var siteRelativeUrl = _spPageContextInfo.siteServerRelativeUrl; var clientContext; var currentWeb; SP.SOD.executeFunc('sp.js', 'SP.ClientContext', function () { clientContext = new SP.ClientContext.get_current(); currentWeb = clientContext.get_web(); currentWeb.set_customMasterUrl(siteRelativeUrl + customMasterPage); currentWeb.set_maste...

Hide Office 365 Logo from SharePoint online sites

Office 365 logo in the SharePoint sites can be changed using more than one method and one of those is using Javascript. We can use DOM to hide or change the logo details and add the function to _spBodyOnLoadFunctionNames. Here is a test script for this purpose: function HideOffice365Logo()  {     var elem = document.getElementById('O365_MainLink_Logo');     elem.innerHTML = "Your Text";     elem.href = "https://bing.com";     elem.title = "Bing!!";     elem.style.color = "#fff"; } _spBodyOnLoadFunctionNames.push("HideOffice365Logo"); The above script hides the logo and replaces it with a text that says Bing! and links to bing.com site. I'm looking for a way to change the logo to another custom image, I'll update this post once I crack it.