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

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

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 no pointers as to how to fix the issue!

I was just developing a function, and suddenly it stopped working, and the only error message I got was this:

In client-side code, if called with $.get(), it looks somewhat like this:

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

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

So, what did I do to cause this?

Steps to reproduce:

For me, this is the way I caused the error.

  1. Create an Azure Function that takes in GET argument(s) using the beta version of the CLI (2.1, in my case)
  2. Call the function from any other source, passing arguments of varying length
  3. Suddenly you notice, with quite a few different arguments, you only get this error from the Azure function: “The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.” It doesn’t happen with all arguments, though!
  4. When the issue is underway, even if you attach the remote debugger to your Azure Function, it won’t fire, at all – so debugging is kind of difficult!

But what on Earth causes this?

Continue reading

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

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

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:

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

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

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 to blame for that. Continue reading

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

Let's fix all the problems!

Every now and then, something like half of Microsoft’s websites will suddenly stop working – this applies to Azure Portal, SharePoint Online sites, MSDN forums and probably a thousand of other sites. The error is most of the time something like this:

Or like shown below:

Azure Portal error

Azure Portal throwing an error, when checking for existing authentication

This effectively blocks you from accessing the site. Most typically, I’ve encountered this on MSDN forums or Azure Portal – I’ve just faced a very blunt, unfriendly and quite useless error message, like above.

Yet once again, the solution is almost stupidly simple.

Continue reading

A cautionary tale of relying on the automatic backups in SharePoint Online

Microsoft Stores Backups For 14 Days, But Restores Them in 15

So Microsoft keeps 14-day rolling backups of your SharePoint Online sites. That’s awesome – no need to take backups anymore, right?

Not so fast. It’s not always so easy, and by just relying on these backups, you risk losing your data. Forever, I might add.

This cautionary tale is about SharePoint Online, but I’d say you’ll need to take caution anytime you’re dealing with Microsoft’s automatic backups. The story starts with the client doing something unwise – a prime example would be them removing the root web of their classic SharePoint Site Collection (don’t do that!).  Continue reading

How to fix Twitter embed in SharePoint

MFW another API just stops working without returning any errors

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 fallback markup on IE9 and IE10 “in the near future”. Since SharePoint 2013 and 2016 are locked in document mode of IE 10 (i.e. using IE on SharePoint sites causes the user agent to be roughly that of IE10), that means basically everyone, who’s using Twitter embeds on SharePoint, will be seeing empty feeds henceforth. Well, save for SharePoint Online users, since SharePoint Online renders in whatever mode Microsoft chooses that week.

Anyway – that change caused surprisingly small issues. Widgets still rendered, until roughly 2 weeks ago. We started getting reports of Twitter being utterly broken – the embed being completely empty without any fallback rendering whatsoever. What’s worse, the embed fails silently (the code looks like it just checks the user agent and ends the execution – thanks a lot, Twitter, much appreciated!)

What’s even worse, is that it applies to IE11 users, too – if they’re in SharePoint, or on a site that’s running in compatibility mode (such as all sites on “intranet” zone). And since IE seems to be most actively used in large organizations, especially on internal communication channels, Twitter just decided to block the majority of IE users in the world from accessing their service via embeds. 

Great job.

Luckily, there’s a dirty hack for this situation!

Continue reading

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

Obama congratulates you on your broken apps

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!  Continue reading

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

SOLVE ALL THE ERRORS!

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:

Okay – so the error claims Azure AD fails to recognize your tenant, as the request or provided credentials didn’t provide that. But is that even true?  Continue reading

How to show any page in a pop-up in SharePoint

This ages old trick deserves to be published – since it makes it easy to quickly show info from pretty much any another page on pretty much any classic SharePoint page (in a SharePoint-compatible pop-up). So, here goes:

Using SharePoint’s JavaScript library to open an arbitrary pop-up

Yes – SharePoint contains all the functionality out-of-the-box, and you almost don’t have to do anything yourself! Let’s see how this works.

Continue reading

Thanks for coming to my session in SPS Nashville!

I was at Cloud Friday and SharePoint Saturday Nashville, and had my session on Saturday – that was a lot of fun! I had the chance to meet a lot of new (and some “old”) people, and I think the community liked my session about Citizen Development tools (for “actual developers”) quite well!

Continue reading

Solving Azure Web Application’s first load perfomance issues

Microsoft Azure logo

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 the what I already knew: initial load times were horrendous, but after that everything worked fine. I did eventually find the solution, though!

Continue reading