[Azure] AAD “You do not have permission to view this directory or page.”

I ran into this error debugging my Cordova app from Visual Studio, running the debugger locally instead of on my device. After logging into Azure Active Directory with valid credentials, the page would display this error:

“You do not have permission to view this directory or page.”

As this was the second time I had to figure out how to solve it, thought I’d do a quick post on it for my own future reference ūüôā¬† (more…)

[IoT] Limiting per device messaging & auto reset

This entry is part 9 of 9 in the series Azure Aquarium Monitor

In my aquarium monitor series I showed how to build an application to monitor a fish tank. The use of the Azure IoT components allow us to easily build these kinds of solutions based on generic components. It also allows us to scale, which makes it very suitable for scenarios with lots of devices or data.

Should you want to make your application multi-tenant, there’s no reason why you shouldn’t… or is there? What if you don’t have complete control over the clients and someone starts to send way more data then expected? Hmm…¬† (more…)

el_logo

Speaking at Experts Live 2016

Thrilled to announce that my session has been selected for Experts Live 2016. As the website says: “Experts live is THE event covering Microsoft Azure, Office365, Enterprise mobility suite, Operations management suite, Hyper-V and Windows”.¬†I will be bringing a little IoT to the mix with my session on how I used Azure IoT components to build submerged. Join me November 22nd, live!

 

How I built Submerged with Azure Functions, IoT and Stream Analytics

 

Tickets are on sale now, get yours now.

Preliminary session planning: 14:45 – 15:45, Room 3

 

 

[Azure] Logging out of Azure AD oauth

In a previous post¬†you can read how I used Apache Cordova to create a client application that is linked to my back-end API hosted in Azure. For authentication, I made use of the built in authentication options of the¬†Azure Mobile Apps plugin for Cordova (GitHub). ¬†This plugin simplifies the authentication flow process, which uses¬†server flow in this case. Basically that means that our Web API handles most of the flow by configuring the Microsoft.Azure.Mobile.Server.Authentication NuGet¬†package.¬†There is also¬†client flow, where the flow is handled client-side, for more info on that check out the great blog series by Adrial Hall on Azure Mobile Apps. (more…)

[Azure] Custom Function bindings + notification tags in Cordova apps

Previously I explained how I am using an Azure Notification Hub to send out notifications to a mobile application made with Cordova (read it here). This is cool, but in that scenario every notification was being sent out to every client. This is fine for some situations but in most cases you probably want some mechanism to send out notification to specific devices or a group of people. The most used example is news: you subscribe to a couple of subjects and receive only notifications for messages linked to one of those subjects. This post details how you can achieve this.¬† (more…)

[Azure] Adding more intelligence to Stream Analytics queries

If you’ve read my previous blog on Azure Stream Analytics, you know how Stream Analytics can be used to process all sorts of incoming data and send the end result to one or multiple outputs. This is particularly useful for ensuring the right data is saved, manipulating the data before saving or only filtering out data in which you’re interested. And that last category is what I used it for: notifications! The query I used previously is not very dynamic, here’s a snippet:

Works, but what if we start adding more sensor values? Hmm, we’d need to change the query each time. Not really what we want to do, right? Time for a better solution.

(more…)

[Azure] Setting up continuous integration for (existing) Azure Functions

I a previous blog I showed how you might replace your existing Azure WebJobs with Azure Functions. If you’re creating these functions as part of a project, you’re bound to have some sort of source control solution in place and you might want to leverage the possibility to automatically deploy your code (aka continuous integration). Luckily Azure Functions supports this, I’ll detail how to set it up in this blog.¬† (more…)

[IoT] Aquarium monitor; Sending commands back to your hardware

Let’s start with some awesome news first! All of the sources for this project are now live on GitHub! Which doesn’t mean I’m close to being finished by the way, but it does allow you to take a look and maybe even contribute should you want to. This includes all of the code from the previous blog posts as well, so go over and take a look:

http://github.com/jsiegmund/submerged

Allright, so let’s get down to what this post is all about: sending commands back to your hardware. (more…)

Web API controller hosted in Azure not respecting [AllowAnonymous]

Working on a project, I encountered a situation I couldn’t wrap my head around. The project includes a (rather simple) ASP.NET Web API project which is published to an Azure App Service instance. Up to now, all of the endpoints I was calling I had secured using Azure AD authentication which is a breeze to set-up. But now wanted to make one specific controller available for unauthenticated calls as well. Normally that’s rather simple, you would just add the [AllowAnonymous]¬†attribute to the controller (or specific action) and voila; authentication would not apply to that one. So I did and published this to Azure only to be returned 401 Unauthorized responses. Hmmm.¬† (more…)

[IoT] Replacing webjob with Azure function

This entry is part 8 of 9 in the series Azure Aquarium Monitor

In this blog post I will not be adding any new functionality to my aquarium monitor project. Instead, I’m going to replace already existing functionality. Not because that’s needed, but just because I can ūüėČ We’ll be looking at replacing our webjob instance using something new which is called¬†Azure Functions.

If you didn’t read it¬†or do not recall, check out the post I wrote on how I implemented notifications. I made use of a webjob to monitor the event hub for incoming notifications (generated by Azure Stream Analytics) and sending those to the notification hub. A few lines of code also constructed the message to send. (more…)