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, […]

SharePoint PnP logo

New-PnPSite fails with “SiteStatus” : 3

Reading Time: 3 minutes. This post was most recently updated on December 4th, 2018.While running “New-PnPSite” or actually any other site creation, method in PowerShell or programmatically, the site creation fails and you get an error like the one below back: New-PnPSite : {"d":{"Create":{"__metadata":{"type":"SP.Publishing.CommunicationSiteCreationResponse"},"SiteStatus":3,"SiteUrl":""}}} Ouch! Where does this come from? In the code of New-PnPSite, the actual function call is shown below: var results = ClientContext.CreateSiteAsync(creationInformation); var returnedContext = results.GetAwaiter().GetResult(); (Source) So, the error is not thrown by PnP cmdlet, but rather comes from SharePoint CSOM. This is pretty normal and not surprising, but means we can’t debug it that much, as CSOM is […]

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 […]

"Get-UnifiedGroup" cmdlet produces a list of your Office 365 Groups with some default properties shown

How to fix an Office Group with no Owners

Reading Time: 6 minutes. This post explains how to add new Owners to your Office Groups using PowerShell. If your group has ended up without any owners, PowerShell might even be the only option, since the graphical user interfaces for Office Groups management are not that good.  Background The hype around Office Groups kind of died down a little bit a while back, since their role wasn’t that clear – they didn’t really do much, and were confusing for end users. Back then, I posted about them replacing Site Mailboxes in SharePoint Online – because that was the first very visible and kind of […]

Broken SharePoint - it's basically an art form

Problematic behavior of web.AddSupportedUILanguage(int lcid) in SharePoint 2013 and 2016

Reading Time: 4 minutes. Every now and then, an API or a method call comes along, that you need to be very careful with. “Microsoft.SharePoint.Client.Web.AddSupportedUILanguage()” seems to be one of them. In this post, I’ll try and document my findings and workarounds for said method!  Issues and solutions Posts Related to “Problematic behavior of web.AddSupportedUILanguage(int lcid) in SharePoint 2013 and 2016”:SharePoint Localization – a (somewhat) comprehensive how-to!SharePoint-Teams -integration using a tabA cautionary tale of relying on the automatic backups in SharePoint Online

Azure Active Directory (Azure AD)

Fixing issue “AADSTS70005” by enabling the implicit authentication flow for your Azure AD app

Reading Time: 3 minutes. This post was most recently updated on December 3rd, 2018.Another day, another Azure Active Directory error! So what’s this AADSTS70005 all about? While either developing or just trying to use an application that authenticates against Azure AD, you might get an error message that contains error code “AADSTS70005“. This means that you’re trying to use implicit authentication flow, but it isn’t allowed for your app. If you have access to the Azure AD you’re authentication against, it’s easy to fix! See more below… Reason You might get an error, somewhat like this: AADSTS70005: response_type ‘token’ is not supported for the application […]

"Publishing Failed" for an Azure Function

Fixing the error “Web Deploy cannot modify the file on the Destination because it is locked by an external process.”

Reading Time: 4 minutes. This post was most recently updated on July 27th, 2018.This post describes how to fix the error, where when publishing Azure Functions or Azure App Services you get an error like this: “Web Deploy cannot modify the file on the Destination because it is locked by an external process.” This is luckily another straightforward fix!  Problem Azure Function Publish fails with a message: “Web Deploy cannot modify the file on the Destination because it is locked by an external process.” It is, indeed, caused by some of your files at the target of your publishing being in use, so they cannot be […]

AADSTS50011: The reply address ... does not match the reply addresses configured for the application.

How to fix AADSTS50011: Reply address did not match because of case sensitivity.

Reading Time: 3 minutes. This post was most recently updated on October 5th, 2018.So, you got an error with a code AADSTS50011? It’s just Azure AD’s authentication acting up because of invalid reply address! here’s a bunch of different reasons that lead to this error. This post describes the variant where the URL’s case sensitivity differns from what’s configured. For me, the most typical scenario where I run into this error is accessing the app from SharePoint. Problem So, you’re getting an error somewhat like this: AADSTS50011: The reply address <…> does not match the reply addresses configured for the application: ‘<guid>’. More details: […]

"The resource you are looking for has been removed, had its name changed, or is temporarily unavailable." leads to a 404 error in jQuery.

How to fix an Azure Function (v2) failing with error “The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.”

Reading Time: 4 minutes. This post was most recently updated on November 1st, 2018.This post describes one way to resolve a problem, where you receive an error like “The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.” when calling your Azure Functions. Update: The issue described in this post has now been fixed, so if you’re using the GA version of Azure Functions CLI, this post shouldn’t interest you anymore! Problem Another day, another simple, yet kind of weird issue to solve! This time I was developing a simple Azure Function to access Microsoft Graph API. This […]

Azure Active Directory (Azure AD)

How to fix AADSTS50011: The reply address does not match the reply addresses configured… error

Reading Time: 5 minutes. This post was most recently updated on November 23rd, 2018.So, you got an error with a code AADSTS50011? That’s ok – it’s just Azure AD’s authentication acting up because of invalid reply URLs! Since there might be a couple of different reasons for this error, this post also describes a couple of different solutions, that might help you overcome the issues. Error So, you’re getting an error somewhat like this: But why? Did you mess something up? Well, if you’re the person who configured the app you’re trying to use, you probably did! Although Microsoft might still be the one […]

MFW another API just stops working without returning any errors

How to fix Twitter embed in SharePoint

Reading Time: 4 minutes. This post was most recently updated on July 6th, 2018.Twitter has always been good for developers, except for those who’d like to embed anything – hence making it possible to interact with their contents on other sites than Twitter. I guess it’s understandable, but they seem to hate anyone trying to embed feeds, searches or anything on their sites. And they express their hate by making the developers’ lives more difficult… This time by silently breaking the embed script in a way, that’s tricky to work around. The Problem In February 2018, Twitter announced that their widgets will start rendering […]

Obama congratulates you on your broken apps

Fixing an unhandled exception about StructureMap configuration failing (messed up assembly bindings)

Reading Time: 6 minutes. So, you’re running a console program, but while you try running it, you get an error like this: “StructureMap.Exceptions.StructureMapConfigurationException”, with a message like this: “Unable to find the exported Type’s in assembly” (the typo done by Microsoft, not me). There’s a number of reasons for this error, but for a fair share of the time that’s just your assembly bindings being messed up. Luckily, that’s another easy fix!  Posts Related to “Fixing an unhandled exception about StructureMap configuration failing (messed up assembly bindings)”:Getting Connect-MsolService (and other Azure Active Directory PowerShell cmdlets) to workA cautionary tale of relying on the automatic […]

SOLVE ALL THE ERRORS!

How to fix AADSTS50059: No tenant-identifying information found in either the request or implied by any provided credentials.

Reading Time: 4 minutes. This post was most recently updated on June 4th, 2018.Have you run into the cryptical “AADSTS50059: No tenant-identifying information found in either the request or implied by any provided credentials.” error? I have. This post will tell you how to fix it. How to fix AADSTS50059? I encountered this error while trying to reload a page with some JavaScript that authenticates against Graph API. It completely blocks the functionality, as it redirects the user to login page. Luckily, at least in my case, this was easily fixed! Your error might look something like this: Request Id: <guid> Correlation Id: <guid> […]

AADSTS90013: Invalid input received from the user. (header thumbnail)

Solving error “AADSTS90013: Invalid input received from the user”

Reading Time: 3 minutes. This post was most recently updated on June 5th, 2018.I stumbled upon a customer, that complained about some pages in their intranet throwing weird errors with authentication. Those pages seemed to have one thing in common – there was a Yammer embed (or a SharePoint script webpart with Yammer embed script in it, to be precise) there. The error code they got was “AADSTS90013: Invalid input received from the user”. Below, you can see an example of the error screen. Okay – this is going to be extremely specific, and probably won’t solve the issue for all of you out […]

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 AD Login error

4 ways to fix error AADSTS65001 (The user or administrator has not consented to use the application)

Reading Time: 6 minutes. This post was most recently updated on November 18th, 2018.Fixing issues with Azure AD authentication for Enterprise applications can be tricky. This article contains multiple different fixes to an issue, where granting admin consent has somehow failed. Not all of the different solutions will work for all situations, though! That’s why I included a couple of different options to try. Changes are, one of them works for you! 🙂 What’s the reason for issues with Admin Consent (like AADSTS65001)? Imagine this: You’re trying to add or use an app, but the requires such permissions from your tenant, that only an […]

SharePoint PnP logo

How to solve errors about missing PnP Cmdlets on PowerShell

Reading Time: 3 minutes. This post was most recently updated on November 25th, 2018.This blog posts briefly describes how to solve some of the most typical errors about missing PnP Cmdlets when using Windows Powershell (or SharePoint Online Management Shell). Symptoms When trying to run some PnP-related cmdlet, you get an error similar to ones below: Connect-PnPOnline : The term ‘Connect-PnPOnline’ is not recognized as the name of a cmdlet, function, script file, or o perable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try aga in. At C:\Users\koskela\Downloads\Import-Valo-With-Content\Import\New-Valo.ps1:46 char:5 + Connect-PnPOnline […]

"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 […]