SharePoint PnP logo

How to fix Add-PnPApp failing with an Access Denied error

Reading Time: 3 minutes. This was a peculiar case! An issue I hadn’t run into before, and luckily a disturbingly simple fix. But first, let’s set up the scene. We were running a long-ish PowerShell script using a Global Administrator account. One part of the script was supposed to add and deploy a couple of SharePoint apps. But while running Add-PNPApp, we ran into errors: Add-PnPApp -Path $path -Scope $app.Scope -ErrorAc… , Error: {"error":{"code":"-2147024891, System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Access denied. You do not have permission to perform this action or access this resource."}}} Oh. That’s… A bit surprising for a Global Administrator, right? What’s causing this? Posts Related […]

SharePoint cat fixing them errors

Subsite creation in SharePoint fails with error 0x80070005 for any user (even global/farm admins!)

Reading Time: 5 minutes. This issue seems to pop up bafflingly often, so I thought it’s finally time to document it for future generations. Granted, it mainly considers Classic SharePoint (which is very tightly built around Publishing features) – but Classic is going to be part of our lives for quite a while still, especially for those of us still primarily on SharePoint Server! While trying to provision subsites to your SharePoint Publishing intranet you encounter either a generic “Access Denied” -error, or any error with 0x80070005 as the underlying error code. Your subsite is not created. This error might surface via the GUI, via PowerShell, […]

In other news in Simpsons: SharePoint Search stopped indexing some properties again.

Issues with User Profile Property visibility in Search-powered functionalities

Reading Time: 3 minutes. This article applies to a lot of different issues you might be having with your SharePoint-powered site, or even custom functionality like mobile apps using SharePoint’s search index. I’ll list a few of the situations, which could be caused by these issues, below: You’re using Search to show a list of User Profiles with their properties, but it’s showing outdated or missing information Your intranet has the classic “Upcoming Birthdays” -webpart (only weather and lunch lists are more classic than that!) This webpart is not showing some of the organization members at all. The aforementioned webpart might also show nobody […]

SharePoint is not broken - it just does't work

Help! My “Content and Structure” page in SharePoint Online is gone!

Reading Time: 5 minutes. This post was most recently updated on November 27th, 2018.First of all: you’re right and your eyes are serving you well. It has indeed disappeared. Starting in October, it’ll be hidden from end users. Microsoft is retiring the “Site Content and Structure” tool in SharePoint Online. Which kind of makes sense, since it’s quite an old feature – albeit, a very useful one. How to access “Content and Structure”? Even though Microsoft is retiring the Content and Structure tool, and has already hidden it from the UI, it’s still accessible. That’s supposing you had access to it in the first place […]

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. This post was most recently updated on August 13th, 2018.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 […]

Something went wrong in SharePoint

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

Reading Time: 3 minutes. This post was most recently updated on September 3rd, 2018.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 […]

SharePoint's broken as usual

How to enable custom scripts for a SharePoint site collection?

Reading Time: 6 minutes. This post was most recently updated on December 4th, 2018.This article explains how to enable custom scripts for any SharePoint site collection. Different instructions and solutions 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 […]

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. This post was most recently updated on October 11th, 2018.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 […]

SharePoint doesn't work as intended

Opening a web part page in maintenance mode

Reading Time: 3 minutes. This post was most recently updated on July 4th, 2018.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 […]

Won my first hackathon!

Hackathon win: Resolving Managed Metadata Madness

Reading Time: 6 minutes. This post was most recently updated on March 29th, 2018.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. This post was most recently updated on November 25th, 2018.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 […]

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. This post was most recently updated on July 11th, 2018.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 […]

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. This post was most recently updated on May 19th, 2018.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 […]

Azure Active Directory (Azure AD)

How to use the Azure AD associated with your SharePoint Online

Reading Time: 4 minutes. This post was most recently updated on October 28th, 2018.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, […]

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. This post was most recently updated on October 9th, 2018.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 was most recently updated on October 9th, 2018.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 […]

SharePoint Search Query Tool

Using SharePoint Search Query Tool

Reading Time: 4 minutes. This post was most recently updated on October 9th, 2018.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/. […]

Office Group

Site Mailboxes deprecated on SharePoint Online – use Office Groups instead

Reading Time: 2 minutes. This post was most recently updated on October 9th, 2018.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 […]