Posts

Showing posts with the label SharePoint Online

What is ODSP_DB Database in browser cache?

Image
What is ODSP_DB in browser cache and how SharePoint Online works with it? In SharePoint Online, Microsoft uses to store its Hub Navigation in  ODSP_DB  browser cache database. It contains various object that helps to build the primary navigation tree first and then on mouse over event the code fetches out the child components. Deleting the browser cache or directly this database actually forces SharePoint online to fetch new navigation. Check out below post on how to clear  ODSP_DB using client side code. SharePoint online hub navigation not updating for other users

SharePoint online hub navigation not updating for other users

Its been quite a time that I am working with SharePoint Online and meeting new challenges every day. Its feels great when you find a solution for something which Google do not tell you. I am just writing this post because there might be someone out there facing the same issue and this post might help him. BTW, before you check the actual post of how to fix the navigation check below, this might also help to change the user language. Problem Description: When an Admin of SharePoint Online site, updates the hub navigation (or may be site navigation), it do not get updated for all the users instantly. User has to clear browser cache to get the updated navigation. As per discussion with Microsoft, SharePoint saves a copy of the navigation in browser cache which automatically refreshes after a certain period of time. By default, you cannot clear browser cache using React or JS code. Browsers do not allow you to do so. So, the user should wait till that time? ABSOLUTELY NOT! (Imran Khan 😋 )...

RangeError: Maximum call stack size exceeded | Node JS | SPFX React

Image
I literally had no idea that my minor experiment can ruin my 10 hours in troubleshooting. However, at the end, you learn something new. I am currently developing a project in SPFX - React to build a customized portal for a client. Later today i modified a config file in the SPFX project called "config.json" to include a new script file. Everything worked perfect until I stopped the debugging and start it again after some time. When I ran Gulp Serve I start seeing below error when Node tried to start "webpack" await Promise.all(externalModule.globalDependencies.map(async (dependencyName) => { RangeError: Maximum call stack size exceeded and some other errors like below. This is probably not a problem with npm. There is likely additional logging output above. npm ERR ! A complete log of this run can be found in : Googled around and found few solutions like clearing NPM cache with  npm cache clean --force and deleting package-lock.json,  then ran npm install ag...

Copy SharePoint Online site pages from one site to another - Easy PowerShell Script

Image
There are several PowerShell scripts and multiple ways OOTB and using third party to copy SharePoint Online Pages from one site to another. However, sometimes it might become a hectic job when you are limited to use OOTB available features only.  I had to copy SharePoint Online site pages to another subsite, and here is the final script that I came up with. You need to download and install  SharePoint Online Management Shell from Microsoft web site and then run it as administrator. After that, copy below script (of course by updating the Source and Destination sites URL) in a notepad file, save it as .ps1 file and then just run this script.    $SourceSiteURL = "https://company.sharepoint.com/sites/ParentSite/ChildSite1" $DestinationSiteURL = "https://company.sharepoint.com/sites/ParentSite/ChildSite2" Connect-PnPOnline $SourceSiteURL -UseWebLogin $Files = Find-PnPFile -List "SitePages" -Match * foreach ( $file in $Files ) { Connect-PnPOnline ...

How to update preferred language (MUILanguages) in SharePoint Online using Power Automate

Image
This is pretty much something that I have not found in a direct way on internet so I thought I must write about it and make someone else's life easier someday. Scenario:  I have scenario where my customer has SharePoint Online portal with multilingual support and some custom developed web parts. During the development phase, the tenant was different and I was able to redirect user to MyAccount so he can change the preferred language,  but this setting was not available on customer's tenant. The reason was, we had Azure AD profiles while customer has synced them from local AD so this setting was not available. I recommend you to check out my this post about the language switch issue that I faced. Problem:   Since the manually preferred language change option was not available, we need to find another way where user can switch to any other language. In my case it was switch to Arabic from English. Solution Overview: Since the preferred way to make the language switch should...

This setting is managed by your organization. You can set display languages through individual applications. O365

Image
You might came across below error while trying to change your preferred display language in MyAccount O365. This setting is managed by your organization. You can set display languages through individual applications. Learn more about how to do this or contact your IT administrator. There could be few reasons for this error, couple of them are below. 1. Admin has set a policy that users cannot set their preferred language 2. Your organization has migrated or synced the AD from local to Azure How to change Preferred Language then? Method 1: In this case, the users cannot change their preferred language from UI. However, Admins can change their preferred language in local AD and set the prefferedLanguage attribute so the users will have the preferred language. Method 2: The other possible way is to set "MUILanguages" programmatically   using a REST API call to Azure user profile. This will update this attribute in AD for the specified user and able to set its preferred language....

Clone or Copy SharePoint Online Site Collection With Lists Content

Image
Modern problems need modern solution...! Although we have spent years with SharePoint On-Premises but its time to move on SharePoint Online. Being SharePoint Administrator in past, now you may have to deal with Microsoft Cloud Admin. It was pretty easy in good old days to copy or clone a site using backup restore or using export import methods. However, that thing do not work anymore in SharePoint Online. You have to try different approach and syntax for this. There are several articles on this but I found this one which lead me to different type of errors and ultimately to the actual solution I was looking for. Here is how I did it... There are three main components in this article. Create a Site in SharePoint online with some dummy data Use PNP PowerShell to backup the site template and list data Create new site and restore the template Important :  The commands I will be using in this article are different than the used in above mentioned article. To run these commands, you nee...

How to enable Content Editor and Script Editor web parts in SharePoint Online?

Image
Although Microsoft recommends to adopt the new technology and customize the SharePoint Online portals through SharePoint Framework, we often come to face the customer's requirement where the customizations go far beyond the out of the box layout and demands something which is not available in Modern pages and layouts. In those scenarios, we have to go back to the classic approach and use the client side scripts and web parts to achieve the functionality. Content Editor and Script Editor web parts were such a blessing during the SharePoint on-premises days and we would love to have them back in SharePoint Online which is currently not available by default. To enable these two champions, there are two ways. Method 1: You can also directly access the Tenant Settings page directly from the browser by accessing the below URL: https : //sharepointerguy-admin.sharepoint.com/_layouts/15/online/TenantSettings.aspx In this page, if you will navigate to the Custom Script section, then you wil...