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 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…Continue reading Fastest way to verify your Client Id and Client Secret are valid with PowerShell

Azure Active Directory (Azure AD)

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

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’…Continue reading Fixing issue “AADSTS70005” by enabling the implicit authentication flow for your Azure AD app

"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.”

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…Continue reading Fixing the error “Web Deploy cannot modify the file on the Destination because it is locked by an external process.”

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.”

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…Continue reading How to fix “AADSTS50011: Reply address did not match because of case sensitivity.”

"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.”

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. 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 particular issue was kind of bugging, since the error message actually had nothing to do with the actual issue and gave…Continue reading 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.”

Azure Active Directory (Azure AD)

How to fix “AADSTS50011: The reply address does not match the reply addresses configured” -error

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. Problem 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…Continue reading How to fix “AADSTS50011: The reply address does not match the reply addresses configured” -error

Let's fix all the problems!

How to log in to Microsoft’s websites (MSDN forums, Azure Portal, SharePoint Online) when you get a “Bad Request” error?

Every now and then, something like half of Microsoft’s websites will suddenly stop working – this applies to at least Azure Portal, SharePoint Online sites, MSDN forums, Office Onlineand probably a thousand of other sites. The error is most of the time something like this: Bad Request – Request Too Long HTTP Error 400. The size of the request headers is too long. Or like shown below: Or alternatively, you’re just stuck in a authentication loop forever. In this case, you don’t really have time…Continue reading How to log in to Microsoft’s websites (MSDN forums, Azure Portal, SharePoint Online) when you get a “Bad Request” error?

MFW another API just stops working without returning any errors

How to fix Twitter embed in SharePoint

Twitter embed has a stupid, built-in failure condition: if the User Agent contains IE10 or older, the embed script will not load. This causes SharePoint embeds to fail. This post describes how to fix that.

Obama congratulates you on your broken apps

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

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)”:The Scary Anatomy…Continue reading Fixing an unhandled exception about StructureMap configuration failing (messed up assembly bindings)

SOLVE ALL THE ERRORS!

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

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:…Continue reading How to fix AADSTS50059: No tenant-identifying information found in either the request or implied by any provided credentials.

Microsoft Azure logo

Solving Azure Web Application’s first load perfomance issues

Is your Azure Web Application suffering from absolutely horrible load times every time someone accesses it for the first time every 15 minutes or so? Mine was. It was pitiful. I was developing a web-based service using EF6 and ASP.NET MVC 5, where all the assets were hosted in the Azure. Even though the app was reasonably lightweight and usually responded very fast, the first time someone accessed it in a while it took 20-60 seconds to load AND sometimes even timed out (especially with…Continue reading Solving Azure Web Application’s first load perfomance issues

SharePoint doesn't work as intended

Opening a web part page in maintenance mode

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”:5 ways to enable Custom Scripts for…Continue reading Opening a web part page in maintenance mode

Let me explain SharePoint...

How to show a Classic SharePoint page in dialog mode (without SharePoint’s full-blown chrome)

Classic SharePoint actually has a very handy piece of functionality, using which you can hide most of the SharePoint chrome (like header and navigation), and hence make the page a lot more sleek. This is especially useful for showing the contents in a dialog window – which SharePoint also supports natively through JavaScript! This post describes how. How to show any (classic) SharePoint page in dialog mode? Pretty easy – it’s handled via a url parameter!  Posts Related to “How to show a Classic SharePoint…Continue reading How to show a Classic SharePoint page in dialog mode (without SharePoint’s full-blown chrome)

Not sure if a bug or a feature

How to get rid of Foxit Drive in Foxit Reader

If you’re like me, you’re not using Adobe Reader, but rather switched to Foxit Reader years ago, and never looked back. Foxit has a great PDF printer, it’s a great reader, but not perfect. The default save location is “Foxit Drive”, and it pops up any time you try to save your document, and at least for me interrupts my workflow. This post describes how to get rid of it, and make Foxit Reader even better! Description of the issue Okay, so Foxit Reader is…Continue reading How to get rid of Foxit Drive in Foxit Reader

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

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

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…Continue reading Solving error “AADSTS90013: Invalid input received from the user”

Console output copypaste

How to output console or PowerShell transcript to a file in Windows

Every now and then, you run into a situation, where you’ll need to somehow dump the console output (or transcript) of running a console application. I’m actually going to argue it happens a lot more often than one would think – in my case, any time a customer requires a webjob or a function, that one would normally deploy to Azure, being ran on the servers of the customer. This post describes how to do that. Problem Something breaks or the app crashes, and the…Continue reading How to output console or PowerShell transcript to a file in Windows

Unified Groups aren't supported.

How to solve “Unified Groups aren’t supported.” -error

When trying to use some functionality, that relies on Unified Groups, you’re getting errors in the console, similar to this: “Unified Groups aren’t supported.” In truth, this most likely means, that Unified Groups (that’s the internal/technical name for Office 365 Groups) is not enabled for this particular user. That breaks a bunch of different features for them, since the Graph API for Groups of course won’t work. This post describes one way to fix this issue! How to solve this? Posts Related to “How to solve “Unified Groups…Continue reading How to solve “Unified Groups aren’t supported.” -error

How to SharePoint?

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

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…Continue reading Using “DetectedLanguage” to return only localized results from SharePoint Search index

SharePoint Search No Results

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

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,…Continue reading Alternative Languages in SharePoint forcing the (cumbersome) use of localized Managed Properties

SharePoint is not broken - it just does't work

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

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…Continue reading Web part title changes not reflected to some users in multilingual SharePoint environment