Thursday, 20 April 2023

Video Embed Using Highlighted WebPart In SharePoint Online Modern Page

Recently our client provided us company anniversary video and asked us if we could add it to SharePoint online site and showcase the result. So, I thought about what the options available are. And I am writing this blog to showcase the options available and their advantages and limitations. Let’s see the options first:


If you want to check any previous options, you can click on that option in the above list and read more about that option.​

If you want to add a video to from current site or any site in your tenant, then you can use this option. For this blog, we will use video from the current site. 
  • Upload video to SharePoint Library.

  • Now add Highlighted Content webpart to your page.







  • Select the pencil icon to edit the web part.


  • In the Source dropdown, select "A document library on this site".
  • In the Document library dropdown, select the document library where your videos are stored.
  • In the Document type dropdown, select Video.


  • In the Filter and sort section, for the Filter dropdown select Column name.


  • In the Column name dropdown, select Name (File).
  • In the next dropdown, select “Equals”.
  • In the Enter search value field, enter the name of video with extension. For example, in my case we will enter “Sample Video 1.mp4”.


  • In Layout, select carousal.


  • Close the ribbon. Update video title manually.


  • Save the page.


  • Video will render as below.



Advantage:
  • The select option can pick video from classic libraries, like site assets.
  • Video is available to any user who has access to the file. If you want to manage permission, that can be done using SharePoint’s permission management. 
  • The video takes full section width.
  • Video provides you expected functionality like shows thumbnail and provides play icon. On play icon click, the video starts.
  • With Stream on SharePoint coming, Microsoft is promoting this option to build video gallery kind of functionality. You can read more on below link:
    Link - https://learn.microsoft.com/en-us/stream/streamnew/portals-set-of-videos

Limitations:
  • We need to provide title in carousal view manually.
  • There are no description or caption functionality. Although you can overcome this by adding the details below the title. The only issue is the separation of title and description is not identical as both have same font size. 

  • On play button click, it will open video in stream.

Monday, 17 April 2023

SharePoint Online Management Shell V16.0 assembly error fix

Issue:

I recently required to use SharePoint Management shell to run some O365 PowerShell commands. But as soon as I run the SharePoint Management shell in administrative mode, I received below error:

Could not load type 'Microsoft.SharePoint.Client.Publishing.PortalLaunch.PortalLaunchRedirectionType' from assembly 'Microsoft.SharePoint.Client.Publishing, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.



I have gone through many links that tells to uninstall the assembly and reinstall, but I didn’t find the exact step by step guide. So, I am writing this blog to provide step by step guide in case someone else might face such issue.

Resolution:

The reason of this error is conflicts between different versions of Sharepoint Online SDKs (SharePoint Client Components, SharePoint Online Management Shell). So correct way to solve this problem is the following:
  • Go to Control Panel > Programs and features and uninstall all instances of SharePoint Online Management Shell and SharePoint Client Components.

  • Open PowerShell console and uninstall existing versions of Microsoft.Online.SharePoint.PowerShell module:
 Uninstall-Module -Name Microsoft.Online.SharePoint.PowerShell -AllVersions  
  • After that close PowerShell, open new session and install latest version of Microsoft.Online.SharePoint.PowerShell module:
 Import-Module -Name Microsoft.Online.SharePoint.PowerShell -Force   


Now when you start the SharePoint Online Management Shell as administrator, you will not face the error.



Reference:

  • http://sadomovalex.blogspot.com/2020/09/how-to-fix-error-could-not-load-type.html