SharePoint PnP logo

Another fix to “Connect-PnPOnline : The sign-in name or password does not match one in the Microsoft account system.”

This post describes a simple way to get around the following error while running Connect-PnPOnline: “The sign-in name or password does not match one in the Microsoft account system.” Truthfully, this one is kind of simple and stupid – but as I’ve seen before, it’s surely worth documenting anyway! Below is an example of such error. PS C:\> Connect-PnPOnline https://contoso.sharepoint.com/sites/CommunicationSite/ Connect-PnPOnline : The sign-in name or password does not match one in the Microsoft account system. At line:1 char:1 + Connect-PnPOnline https://contoso.sharepoint.com/sites/CommunicationS … + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ […]

How to revert Modern view back to Classic for SharePoint libraries using PowerShell

If your customers are anything like ours, some of them love the new modern library view, some will adjust and some just hate it and want to get as far away from it as possible. While embracing the new stuff is usually smart, there’s some value to sticking to what works as well. The Modern view is going to be the superior choice of the two (if it isn’t already!), but there are a multitude of reasons why one might want to revert to the […]

Not sure if a bug or a feature

Help! My ASP.NET MVC textbox date format is wrong!

Have you ever been struggling, to make your ASP.NET MVC views format your properties of type datetime correctly? I have. And I’ve been shot in the leg by weird hacks made by both me (just 6 months earlier) or someone else. So I thought I’d finally document the different ways one can set up the formatting of datetime fields in ASP.NET MVC projects. Or at least all the ways I’ve found so far! :) While this guide has been written for ASP.NET MVC, most of […]

"Chrome SP Editor" -about page

SharePoint Search Console – Now available inside Chrome SP Editor!

This post is about two of my favorite tools: Chrome SP Editor, and SharePoint Search Query tool. Or maybe better yet, an amalgamation of the two! Description I’ve mentioned the Chrome SP Editor before, and for a good reason. It’s a great tool for any IT Pro or Dev working with SharePoint on a daily basis. It’s maintained by a very talented developer, one of the people behind Valo Intranet, Tomi Tavela. If you’re using the tool, let him know on Twitter! But I’m not […]

Microsoft SQL Server logo

Easily querying all the database and log file sizes on SQL Server

Quite often you get the need to simply quickly query all the database sizes on MS SQL Server – most typically, for us, this need arises when a development machine gets low on disk space, and we need to check if some database’s log size has been growing, or if something else is wrong. In my daily work, I rarely encounter this requirement anymore. Azure has almost entirely obliterated the need for such diagnostics, since it’s so easy to spin up or scale up new […]

Microsoft Privacy

What is “fp.js” – and why is it snooping on your SharePoint usage?

Microsoft is gathering all kinds of telemetric data out of the usage of SharePoint. I ran into an interesting JavaScript file, fp.js, on SharePoint Online doing just that. Gathering data. It loads on pretty much every single page request, so it’s something you’ll bump into anytime you open your developer tools! Your customer’s IT might even inquire about it – perhaps wanting to disable it for perfomance or information security gains? But what is fp.js and what does it do? Posts Related to “What is […]

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

Solving yet another “Microsoft.SharePoint.Client.ServerException: Unknown Error”

There’s maybe a thousand things that can throw an “Microsoft.SharePoint.Client.ServerException”, but a bit smaller amount of things, that are ambiguous enough to be called “Unknown error”. This post describes one, fairly usual fix for this issue! But let’s get back to the beginning for a second – you get what and when now? When running any code, that provisions new sites (much like https://www.koskila.net/new-pnpsite-fails-with-sitestatus3/), you get an error like this almost immediately: Microsoft.SharePoint.Client.ServerException: Unknown Error at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream) at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse() at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServer(ChunkStringBuilder sb) at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery() […]

Get-Command -Module AzureRM.Profile. You're seeing it correctly - it doesn't have a Logout-AzureRmAccount, Disconnect-AzureRmAccount, Remove-AzureRmAccount or even Remove-AzureRmContext commandlets! That's a lot of fun :)

Oh no! PowerShell cached my Azure credentials and I messed up wrong customer’s environment!

Whoops. Could happen to anyone, since the Azure PowerShell since (approximately) version 6.3.0 will cache your credentials between sessions without warning you. It’s really easy to run your commands with cached accounts, and end up executing your scripts against the wrong environment. In less serious cases, this means that you’ll end up running commandlets twice against the test environment, while you think you’re running them first against test, and then production. In more serious cases, you’ll deploy your ARM templates or run your cleanup scripts against wrong […]

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

Fixing “-2147024891, System.UnauthorizedAccessException” when accessing SharePoint SOAP Web Services

This post is about delving into some legacy stuff – Microsoft has still kept SOAP-based SharePoint Web Services included in the product, since a lot of functionality has been built on top of them. We encountered an issue where you suddenly started getting exceptions for Unauthorized Access (-2147024891, System.UnauthorizedAccessException), no matter if you had access to the list or not. Error description We started getting this error, when requesting list items using SharePoint SOAP Web Services (namely, Lists.asmx): <m:code>-2147024891, System.UnauthorizedAccessException</m:code> <m:message xml:lang="en-US"> Access denied. You […]

SharePoint PnP logo

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

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