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

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

Reading Time: 4 minutes. 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… Posts Related to “Ignite 2018 recap: What’s new for Azure Functions?”:SharePoint-Teams -integration using a tabGetting Connect-MsolService (and other Azure Active Directory PowerShell cmdlets) to […]

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

Reading Time: 3 minutes. 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, and a bunch of other people on the internet, ran into some issues with our […]

Azure Functions SDK 2.0 settings in accessed in C# code

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

Reading Time: 4 minutes. This post was most recently updated on November 19th, 2018.Different versions of Azure Functions have different ways to access the Azure Function settings. This is another little thing, that I always forget – so better document it somewhere! So, this post describes, how you can access the function’s Application/Environmental settings/variables from your C# code. Posts Related to “How to access Azure Function App’s settings from C#?”:SharePoint Localization – a (somewhat) comprehensive how-to!SharePoint-Teams -integration using a tabPrivacy Policy

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

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

Microsoft Azure logo

Solving Azure Web Application’s first load perfomance issues

Reading Time: 3 minutes. This post was most recently updated on October 9th, 2018.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 mobile clients). Load testing revealed only […]

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!

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

Microsoft Flow that's used in this demo - it uses an Azure Function to extract text from a doc, which is then sent to Text Analysis, and finally written back to SharePoint. In the end, it sends notifications of the status of the run.

How to Resolve Managed Metadata Madness in SharePoint?

Reading Time: 3 minutes. This post was most recently updated on February 8th, 2018.Using Azure Functions and Cognitive Services Text API to enrich a Flow that fills Metadata for new items in a Modern SharePoint Team Site. That’s, in a nutshell, the solution I submitted to a recent online hackathon. Quite a mouthful, isn’t it? The whole solution (and a public vote, if you’re interested!) is available here: https://devpost.com/software/resolving-managed-metadata-madness-in-sharepoint – this blog post will describe the solution and the reasoning behind it. Preface Some time ago my manager asked me to take a few weeks off, since I had accrued quite a lot of overtime during […]

Call to sites Graph API requires “owner” permissions for site collection regardless of app permissions

Reading Time: 4 minutes. This post was most recently updated on March 20th, 2018.Okay – yet another weird issue, and a hacky workaround. I was developing an app that was calling a SharePoint site through Graph API, using jQuery $.ajax call (developed in TypeScript), and ran into surprising 401 errors. I did find a workaround, but am also working on an actual fix. Description To get SharePoint site ID, which is needed when accessing SharePoint lists, the calls seemed to fail for my test accounts. Everything was working fine for my developer account, which was a global admin, so the first thing I was […]

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

Connect-MsolService

Getting Connect-MsolService (and other Azure Active Directory PowerShell cmdlets) to work

Reading Time: 10 minutes. This post was most recently updated on October 9th, 2018.In this post, I’ll try to archive everything you need to download and install to get commandlets like Connect-MsolService working. I’ve had to do it a couple of times when changing laptops, so it’s good to document them somewhere! 🙂 So, when would you need to follow this guide and install the modules described here? Mostly this comes to play, when you’re switching machines, try to run the SharePoint Online Management shell but it doesn’t even exist on the machine, or it does exist but you get random errors like this: […]

Applying Entity Framework’s Code-First Migrations against a Database in Azure by running Update-Database

Reading Time: 3 minutes. This post was most recently updated on October 9th, 2018.This post describes how to run Entity Framework’s code-first migrations against a database located in the Windows Azure. This is done by running Update-Database commandlet with suitable switches, see below. The problem and symptoms Okay, so you’re developing your MVC+EF cool web app with a database in Azure, and you’re using code-first migrations. Cool! What’s nice with code-first-migrations is the fact they are run automatically even in the cloud the next time your app is running (as long as you publish your app with that little box ticked – something like […]

Update-Database error

Fixing “An error occurred while updating the entries” while running code-first migrations in MVC 5 app

Reading Time: 6 minutes. This post was most recently updated on October 9th, 2018.This post describes an issue with EF’s code-first migrations, when mapping between DB’s DateTime and C#’s DateTime kind of fails, and results in Update-Database cmdlet failing. It’s more or less a prime example of a situation, where the error itself tells very little about the actual issue, and since debugging code-first migrations is kind of difficult (see the best tips for that here!), it’s cumbersome to investigate. Symptoms "An exception of type ‘System.Data.Entity.Infrastructure.DbUpdateException’ occurred in EntityFramework.dll but was not handled in user code." I’ve encountered this error in 2 different situations. […]

Azure SQL Error

Fixing error “Cannot open server – – requested by the login. Client with IP address – – is not allowed to access the server.” in Azure deployments from Visual Studio

Reading Time: 4 minutes. This post was most recently updated on October 9th, 2018.This post describes how to work your way around the exception ‘Cannot open server – requested by login…’ The issue is caused by Azure’s somewhat annoying firewall logic, and might stop you from accessing your databases from your development machine. Symptoms When trying to publish a web project to Azure from Visual Studio, you suddenly get the following (or similar) error message: “Cannot open server ‘xxx.xxx.xxx.xxx’ requested by the login. Client with IP address ‘xxx.xxx.xxx.xxx’ is not allowed to access the server. To enable access, use the SQL Azure Portal or run […]

Too long deployment path

The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

Reading Time: 3 minutes. This post was most recently updated on October 9th, 2018.This post describes a few different ways of fixing the error “The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.” one can get when trying to package/publish a SharePoint solution, web site or Azure Webjob. UPDATE 11.4.2016: I actually got this nasty exception on another occasion (Azure webjob publish), so I updated the text accordingly. Symptoms Visual Studio throws the following error when packaging a SharePoint solution to a .wsp […]