Get-MsolServicePrincipalCredential - how to get the expiration date for a clientId

Fastest way to verify your Client Id and Client Secret are valid with PowerShell

Reading Time: 3 minutes. So, you have a Client Id and a Client Secret, but don’t know if they work anymore? Maybe they are expired? Maybe someone removed them? No worries! We can use PowerShell to validate them easily! Solution By using PowerShell, it’s fairly straightforward to verify, that your Client Id and Client Secret work. See the snippets below for 2 different steps: First we validate, that the values work. If they don’t, let’s run another script to see if the Client Id exists but has expired. Validate your Client Id by trying to connect with it We can validate the Client Id […]

Something went wrong in SharePoint

Solving “Tenant app deployment is only supported in the app catalog site.” -error

Reading Time: 3 minutes. Got an error “Tenant app deployment is only supported in the app catalog site. The current site is not the app catalog site.”, even if the current site very much IS an app catalog site? There might be an easy fix! Problem Imagine this: you browse into your fresh SharePoint tenant, open the app catalog, click on an app, try to deploy it, and out comes this error. Tenant app deployment is only supported in the app catalog site. The current site is not the app catalog site. Yes, while trying to deploy an app from app catalog, you get […]

Trying to upload a 10kb file to SharePoint: "Sorry, your files couldn't be uploaded. The upload might be too large or the server might be experiencing high network traffic."

How to enable custom scripts for a SharePoint site collection?

Reading Time: 5 minutes. This article explains how to enable custom scripts for any SharePoint site. Different instructions apply to SharePoint Online, and on-premises scenarios (SharePoint 2013, 2016 and probably 2019). Different solutions resolve the issue for different target sites: Modern SharePoint Team Sites (attached to Office Groups) SharePoint MySites Personal OneDrive sites Any SharePoint site collection created based on self-service site creation SharePoint Online tenant root site collection Any Classic SharePoint site collection Errors and causes Most typically I run into this when trying to insert a script web part with custom JavaScript into a site, that has NoScript enabled. That’s annoying – […]

Microsoft Stores Backups For 14 Days, But Restores Them in 15

A cautionary tale of relying on the automatic backups in SharePoint Online

Reading Time: 10 minutes. So Microsoft keeps 14-day rolling backups of your SharePoint Online sites. That’s awesome – no need to take backups anymore, right? Not so fast. It’s not always so easy, and by just relying on these backups, you risk losing your data. Forever, I might add. This cautionary tale is about SharePoint Online, but I’d say you’ll need to take caution anytime you’re dealing with Microsoft’s automatic backups. The story starts with the client doing something unwise – a prime example would be them removing the root web of their classic SharePoint Site Collection (don’t do that!).  Posts Related to “A […]

SharePoint doesn't work as intended

Opening a web part page in maintenance mode

Reading Time: 3 minutes. Can’t access a web part page because of a broken web part? Yeah, that’s a classic issue – and it’s nicely ported into Modern world, too! In these cases, web part page maintenance mode comes in handy! There’s a query parameter available for accessing it. For whatever reasons, it’s different for Classic and Modern mode, though. Why make things easy if you can make them dificult, right? 🙂  Posts Related to “Opening a web part page in maintenance mode”:SharePoint-Teams -integration using a tabSharePoint Localization – a (somewhat) comprehensive how-to!The effect of using Managed Navigation instead of Structural on SharePoint Online

Won my first hackathon!

Hackathon win: Resolving Managed Metadata Madness

Reading Time: 6 minutes. I won a hackathon! They had fun topics, it was a cool challenge, a well organized event, and had cool prizes. Since this is the first hackathon I ever took part in, I thought I’d post something about my experience and the solution(s) I figured out. Posts Related to “Hackathon win: Resolving Managed Metadata Madness”:SharePoint-Teams -integration using a tabA cautionary tale of relying on the automatic backups in SharePoint OnlineSharePoint Localization – a (somewhat) comprehensive how-to!

Let me explain SharePoint

Don’t remove the root web of your classic SharePoint Site Collection!

Reading Time: 5 minutes. A quick heads-up – if you remove the root site (or RootWeb, like it’s called in the code) of your classic SharePoint Site Collection, that’s going to cause you some grey hairs. It might even, in some rare cases, be unrecoverable! Why? Whereas you can always restore a normal site from the site collection recycle bin, the root site you can’t. You actually can’t access the recycle bin after removing the root site, nor can you make magic happen with PowerShell commandlets anymore. The Recycle Bin would be located at a URL like this: https:///_layouts/15/AdminRecycleBin.aspx, but after the site is removed, […]

SharePoint is not broken - it just does't work

How to fix “- – the web site does not support SharePoint Online credentials. The response status code is ‘Unauthorized'” error

Reading Time: 5 minutes. While running some SharePoint Online -PowerShell commandlets, or connecting to a SharePoint Online site from your app, you get a following (or similar) error about your SharePoint Online credentials being unauthorized for something you should definitely be authorized to do: Cannot contact web site ‘https://<tenant>-admin.sharepoint.com/’ or the web site does not support SharePoint Online credentials. The response status code is ‘Unauthorized’. And that’s not all – by digging into the full error message, you find the underlying internal error: MSDAVEXT_Error=917656; Access+denied.+Before+opening+files+in+this+location%2c+you+must+first+browse+to+the+web+site+and+select+the+option+to+login+automatically. What awakens my curiosity, is this line: Access denied. Before opening files in this location, you must first browse […]

How to SharePoint?

Using “DetectedLanguage” to return only localized results from SharePoint Search index

Reading Time: 5 minutes. Localization and targeting of content in multilingual SharePoint installations is always an issue. SharePoint offers a multitude of ways profile content based on user language (or other properties), but none of the solutions are fool proof. This post describes how to fetch only localized results from SharePoint Search index, which solves at least some of the issues. Description  SharePoint Search index can be used in quite a few different ways. Probably the most typical way is by searching on SharePoint, or using webparts like Content Search or Content Results. However, one can also build custom functionality, custom client-side liftups, webjobs, […]

SharePoint Search No Results

Alternative Languages in SharePoint forcing the (cumbersome) use of localized Managed Properties

Reading Time: 3 minutes. Localization and multilingual environments in SharePoint are an endless source of interesting issues and blog post topics. In one case, we had a tenant created originally in English, and a site collection created in Finnish. In this particular case, SharePoint somehow messed up the language settings, and ended up requiring the use of localized managed properties on the search center of that site collection. That ended up being unexpected, unituitive and unusable for the end-users. Description of the issue Typically, when you use SharePoint Search, you can use managed properties to search for values in certain fields or columns of […]

SharePoint is not broken - it just does't work

Web part title changes not reflected to some users in multilingual SharePoint environment

Reading Time: 3 minutes. I encountered another, interesting issue – this time in a SharePoint environment, where multiple display languages were in use. When changing the web part title on a web part on a classic SharePoint page, it seems like SharePoint saves the changes for you. In reality, only some users see the changes. So, in short: Some other users, on some devices, see the old title, whereas some see the new one. It’s a confusing situation and difficult to debug. Why do web part titles get changed seemingly randomly? Imagine this: You have a SharePoint environment, where you have multiple different languages set […]

Azure Active Directory (Azure AD)

How to use the Azure AD associated with your SharePoint Online

Reading Time: 3 minutes. With the usual configuration of Office 365 and Azure, there might be multiple Azure AD (AAD) instances associated with your subscription. When creating registrations to whatever SharePoint-related apps that you might be using, if you create the registration to the wrong Azure AD, it can’t access the data in your SharePoint. Or at least without further configurations, it probably won’t get any data from your Office Graph API or whatever else you might want to use.  How to find the instance of Azure AD associated with your SharePoint Online It’s simple, luckily!  Posts Related to “How to use the Azure […]

If you could just fix SharePoint... That would be great.

The effect of using Managed Navigation instead of Structural on SharePoint Online

Reading Time: 4 minutes. Have you ever noticed that your SharePoint site just gets slower and slower? That’s probably because the performance of Structural Navigation is absolutely horrible, especially vs. Managed Navigation. This blog post includes our findings about the issue, and I also include some explanation of the reasons behind the difference and a simple comparison to Search-based navigation. Posts Related to “The effect of using Managed Navigation instead of Structural on SharePoint Online”:SharePoint Localization – a (somewhat) comprehensive how-to!A cautionary tale of relying on the automatic backups in SharePoint OnlinePrivacy Policy

"For security reasons DTD is prohibited in this XML document. To enable DTD processing set the ProhibitDtd property on XmlReaderSettings to false and pass the settings into XmlReader.Create method."

Fixing the “For security reasons DTD is prohibited in this XML document.” issue

Reading Time: 3 minutes. This post describes a couple of ways to fix the issue “For security reasons DTD is prohibited in this XML document”. At least for me, it appeared when trying to access SharePoint Online using Powershell or a console program using OfficeDev.PnP (which in turn uses CSOM). Error When running any piece of code, whether in PowerShell, .exe console or anything else than in the code behind relies on .NET Framework, you get an error like this: For security reasons DTD is prohibited in this XML document. To enable DTD processing set the ProhibitDtd property on XmlReaderSettings to false and pass the […]

SharePoint Search Query Tool

Using SharePoint Search Query Tool

Reading Time: 4 minutes. If you’re working on SharePoint deployments, and aren’t familiar with SharePoint Search Query Tool, you’re probably doing something wrong. Or you’ve gotten a really troublefree tenant and simple requirements.. 🙂 At least for technical issues, it’s the #1 tool for debugging what’s in the index and what isn’t. This blog post describes how to use it to investigate SharePoint Online Search index issues. This blog post is about using SharePoint Search Query Tool to investigate search index issues in SharePoint Online. First of all, you can get the tool from here: https://sp2013searchtool.codeplex.com/. Posts Related to “Using SharePoint Search Query Tool”:SharePoint Localization […]

Office Group

Site Mailboxes deprecated on SharePoint Online – use Office Groups instead

Reading Time: 2 minutes. Microsoft is deprecating, or even removing one of the widely used features in SharePoint sites – Site Mailboxes. For the end-user this might no mean much, but still requires some additional work from the administration side. In this post, I’m trying to give a rough outline, on what you (as an administrator/content producer) should do. So, what exactly is happening? Posts Related to “Site Mailboxes deprecated on SharePoint Online – use Office Groups instead”:SharePoint-Teams -integration using a tabSharePoint Localization – a (somewhat) comprehensive how-to!A cautionary tale of relying on the automatic backups in SharePoint Online

Connect-MsolService

Getting Connect-MsolService (and other Azure Active Directory PowerShell cmdlets) to work

Reading Time: 10 minutes. In this post, I’ll try to archive everything you need to download and install to get commandlets like Connect-MsolService working. I’ve had to do it a couple of times when changing laptops, so it’s good to document them somewhere! 🙂 So, when would you need to follow this guide and install the modules described here? Mostly this comes to play, when you’re switching machines, try to run the SharePoint Online Management shell but it doesn’t even exist on the machine, or it does exist but you get random errors like this: The term ‘Connect-MsolService’ is not recognized as the name […]

Delete site collection

Remove-SPODeletedSite – Actually removing a SharePoint Online Site Collection

Reading Time: 3 minutes. This post describes the actual, working and fast process of removing a site collection in SharePoint Online using the Remove-SPODeletedSite commandlet in SharePoint Online Management Shell (a flavor of PowerShell). Description Sometimes you need to get rid of a site collection you’ve created in SharePoint Online. The most typical example perhap being removing the team site created for a group of people working together. That’s pretty simple and there are a few ways of doing that. For example, you might just go ahead, and delete the site from Site Settings (see below). Or maybe you’re a smart admin, and you go and […]

SharePoint_aint_broken

Updating files in an App Part (SharePoint Add-in)

Reading Time: 3 minutes. Luckily, SharePoint Add-ins (or App Parts, like they were called earlier) are slowly getting killed and rooted out of all the sites they once were deployed to – and I don’t think anyone’s going to miss them. However, as so often happens with legacy implementations, there will still be thousands of sites, where SharePoint administrators and developers will be responsible for maintaining and developing the solutions further. This will occasionally require updating app parts, which is a process that kind of sucks. Here I’ll try to simplify the process. Problem(s) Not all the files in an app part are updated during the […]