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

“500 Internal Server Error” after updating a WordPress site to PHP 7.3

Now for something totally different – for a change, I got to fix an issue with my own blog, so I had the chance to delve into PHP and WordPress configurations… :) PHP is an ever-evolving language – even if it might not always feel that way. The old workhorse has been powering most of the internet for a couple of decades, and weirdly enough, doesn’t really show signs of going anywhere. A huge part of the success story has been the fact that WordPress, […]

SOLVE ALL THE ERRORS!

Azure Functions failing on “OPTIONS” call? Quick fix!

I recently ran into an issue when developing Azure Functions locally. My SPFx webpart was configured to request information from my locally running Azure Function, but suddenly started ending up in error. Browser only showed 404 for the first request (OPTIONS) the SPFx webpart was sending – although I knew the function was up and running! So what to do?

Visitors of koskila.net categorized by Google

Thanks for an amazing 2018!

Year 2018 is drawing to an end, and it’s a good time for some reflection on what an interesting year it’s been! Personally, quite a few things have happened in the last 12 months – I moved to Canada, started a new/old job, became a father, spoke at awesome events, met a lot of cool people – just tons of awesome stuff. But personal things aside, 2018 has been an interesting and rewarding time to be writing this blog! 2018 was the year when the […]

Office-365-logo

The Scary Anatomy of a Microsoft License Fraud

Note: While this was originally posted around the Christmas of 2018, and some company or seller names might not be relevant as scammers come and go, the principles in this blog post seem to be valid since early 2000s to probably until 2038 (when the Internet ends due to the Epochalypse). Tis the season for gifts, and lots of y’all might be thinking about giving out a digital gift. Maybe some of the more practical ones think about gifting someone a subscription of Office 365 […]

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

SharePoint cat fixing them errors

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

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

SharePoint PnP logo

New-PnPSite fails with “SiteStatus” : 3

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

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

Issues with User Profile Property visibility in Search-powered functionalities

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

"PictureThumbnailURL" configuration in SharePoint Online Search Schema

Fixed: “PictureThumbnailURL” always null in SharePoint Online Search results

This post describes the status of an ongoing issue in SharePoint Online, where the Managed Property “PictureThumbnailURL” will return null no matter what you do. This Managed Property is used for a few different use cases – most notably, Delve blog post’s hero, or header photo’s URL is mapped to this property, as it’s meant to be used as a thumbnail picture in a number of rollups. Update 9.1.2019: Microsoft confirmed they’re testing a possible fix to the problem. I’ll update this post as more […]

"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

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

SharePoint is not broken - it just does't work

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

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 tool, and has already hidden it from the UI, it’s still accessible. That’s supposing you had access to it in […]

SharePoint Saturday New England logo

Speaking at SPS New England on 10/20/2018!

Another exciting announcement to make – I’ll be speaking at SharePoint Saturday New England on 20. of October in Boston!  My session about Microsoft Flow, Azure Functions and a bit of Cognitive Services was accepted for the developer track. I’ll be presenting at 9:00 – 10:15 AM in room Cranmore. There’s a lot of awesome sessions and other awesome speakers, and I’m honored to share with the community what I’ve learnt lately while playing with some of the latest and greatest of Microsoft’s tools! :) […]

Azure Functions CLI - such a pretty logo for such an awesome functionality

Ignite 2018 recap: What’s new for Azure Functions?

Ignite 2018 is done and dusted, and it’s a good time to quickly recap what’s new for Azure Functions in the coming months. They’ve certainly been getting a lot of love from Microsoft, which is GREAT! New features for Azure Functions There was a bunch of exciting new things announced! Not all of the things in this blog post are necessarily completely new – but rather reached General Availability. Let’s go through them one by one…

The following functions are in error... And that's about it.

Fixing “The following functions are in error: Object reference not set to an instance of an object.” error in Azure Functions

Let me start this article, by reminding everyone that Azure Functions are awesome, and you should use them despite some hiccups. Having said that, let’s fix some errors! In the beginning of September 2018, Microsoft started pushing out breaking changes to Azure Functions 2.x. They had announced this a full month in advance, so they expected everyone in the world to update their Azure Functions to avoid the functions from breaking. I guess, however, that in real life, a month is not that much. Me, […]

Azure Functions SDK 2.0 settings in accessed in C# code

How to access Azure Function App’s settings from C#?

This post describes, how you can access the function’s Application/Environmental settings/variables from your C# code. Different versions of Azure Functions have different ways to access the Azure Function settings. This has been another little thing, that I always forget – so better document it somewhere! How to get application settings in different runtime versions of Azure Functions? This has changed between different versions of Azure Functions runtime – so I’m describing what works for your functions using v1 runtime, what works for v2, and of […]

Let's fix SharePoint Search together!

How to interpret SharePoint’s view count managed properties (like “ViewsLast1Days”)?

Have you ever wondered, how SharePoint’s Managed Properties for Usage & Analytics info actually work? There are all these nice properties available for getting view counts for different items in SharePoint’s search index, but they all seem to act like crazy. Plus they are sometimes pretty nonsensical… And not very well documented! In this post I’ll try to make some sense on how you can use them in programmatic scenarios. Read on… Update 12.3.2019: I’ve updated the post based on a lot of empirical research […]

PowerShell header

Properly checking if an item in a folder is a Directory or not in PowerShell

Got a great tip from a colleague, on how to properly check if an item is a file or a directory. In one case, we weren’t really ever sure, if another script had finished its running and unzipped a certain zip package into a folder – and we had to verify it had, before continuing the execution. Our initial implementation worked most of the time… But not quite always. The purpose of this blog post is to explain how we found a pretty well working […]

Requests to WsaUpload.ashx showing up on the Network -tab of your browser

Disabling requests to WsaUpload.ashx (Customer Experience Improvement Program)

So, I’ve gotten this question from a lot of customers and partners, and I thought it’s worth clarifying the case a bit. “I’m seeing a lot of requests these requests to WsaUpload.ashx. What do they matter? They seem to degrade the performance – so what can I do about them?” That’s a great question! Let’s see what it is, why it exists, and what we can do about it!

Brace yourselves! Notification emails from SharePoint are coming.

Subscribe to changes on a SharePoint list

SharePoint List Alerts. That magnificent functionality in SharePoint, that let’s you get a heads-up anytime someone touches your precious documents (so you can go and revert the changes), or changes files in Style Library (so you can go and remove that pink custom CSS they tried to add). Very useful for a lot of scenarios! The functionality is ancient, quite cumbersome and CERTAINLY not pretty, but it’s straightforward and quite reliable. On SharePoint Online, the notifications/alerts seem to work automatically, with no configuration whatsoever, and […]

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

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 Table of Contents SolutionValidate your Client Id by trying to connect with it 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 […]

PowerShell header

How to get the user count for Azure AD Enterprise Application

Have you ever tried to find out the number of users of an enterprise application in your Office 365 tenant? This could be needed for multiple different reasons: maybe your organization is paying for the app and you want to know who’s actually using it, maybe the usage is required by a company policy and it’s useful to know if organization’s members are actually using it, or maybe you just want to know about the user adoption of an app. For apps with under 100 […]