This is part 3 in a series of posts about writing service brokers in .NET Core.
6 posts tagged with "Azure AD"
View All TagsA simple way to get an access token for working with Azure REST API from PowerShell
This post is sort of a follow up on a previous post where I attempted to prevent a duplicate login when accessing both Azure Resource Manager and Azure AD in the same PowerShell script, still without success by the way.
Prevent double login for Azure Resource Manager and Azure AD in PowerShell
UPDATE (2018-02-12): The method described below does not work, unfortunately. Connect-AzureAD
runs without error but the AD context you get is not authorized to perform AD operations.
SignalR hub authentication with ADAL JS (part 2)
In [part 1][1] of this post I described how to solve the first part of the problem: making sure the JWT token we got from ADAL JS gets sent to the server (i.e. the SignalR hub). Part 2 describes how the server extracts the token, validates it and creates a principal out of it. In another post I already described how to configure an Owin middleware pipeline that does exactly this: via UseWindowsAzureActiveDirectoryBearerAuthentication (and if you Google this extension method you'll find a lot more information).
SignalR hub authentication with ADAL JS (part 1)
In a previous post I described how to use ADAL JS with Azure AD role-based authorization. This works fine when you're securing a Web API or MVC backend. However, what about SignalR hubs?
Combining ADAL JS with role-based security in ASP.NET Web API
In October 2014, Vittorio Bertocci introduced ADAL JavaScript. This library makes it possible for single-page-apps to use Azure Active Directory authentication from within the browser. ADAL JS uses the OAuth2 Implicit Grant for this. The introductory blog post and an additional post when v1 was released explain in detail how to configure and use the library.