Leveraging the Microsoft Graph API with PowerShell and OAuth 2.0

Update Oct 2019: See this post for simplifying oAuth Authentication to Microsoft Graph using PowerShell and the MSAL (Microsoft Authentication Libraries)

Background

Microsoft Graph is the evolvement of API’s into Microsoft Cloud Services. For me not being a developer, a key difference is interacting with with Graph API using OAuth 2.0 via PowerShell. Through a number of my previous posts I’ve interacted with the Graph API using client libraries such as the Microsoft.IdentityModel.Clients.ActiveDirectory library. This post details using PowerShell to talk directly to Graph API and managing Authentication and Authorization using OAuth 2.0 and Azure WebApp.… [Keep reading] “Leveraging the Microsoft Graph API with PowerShell and OAuth 2.0”

Azure API Management Step by Step

jorge-fotoIntroduction

As a speaker and cloud consultant, I have learned and received a lot of feedback about Azure API management platform from customers and community members. I will share some of my learnings in this series of blog posts. Let’s get started!

apim-image

APIs – Application programming interfaces are everywhere! They are already part of many companies’ strategies. But how could we consolidate internal and external APIs? How could you productize and monetize them for your company?… [Keep reading] “Azure API Management Step by Step”

Create a new Active Directory Forest using Desired State Configuration

Originally posted on Nivlesh’s blog @ nivleshc.wordpress.com

Desired State Configuration (DSC) is a declarative language in which you state “what” you want done instead of going into the nitty gritty level to describe exactly how to get it done. Jeffrey Snover (the inventor of PowerShell) quotes Jean-Luc Picard from Star Trek: The Next Generation to describe DSC – it tells the servers to “Make it so”.

In this blog, I will show you how to use DSC to create a brand new Active Directory Forest.… [Keep reading] “Create a new Active Directory Forest using Desired State Configuration”

Applying Business Rules to Profile Photos Using Microsoft Cognitive Services

A customer I am working with at the moment is in the (very) early stages of discussion around the gathering and application of profile photos across their internal systems. In this particular case, we are considering that the photos themselves do not exist. Sure, there are ID card photos of startled staff taken on day one of their employment, but people being people, they would rather not be forever digitally represented by their former selves – particularly not the version of themselves which had an ID photo taken in a poorly lit un-used meeting room 7 years ago before they got that gym membership.… [Keep reading] “Applying Business Rules to Profile Photos Using Microsoft Cognitive Services”

Developing and configuring Multi-tenant applications using AngularJs, WebAPI and Azure Active Directory

In this post, I am going to share my experience about publishing multi-tenant applications in Azure Active Directory where Azure Active Directory’s role is OAuth server.

You can read more about OAuth2.0 at https://oauth.net/2/ . I am going to use implicit flow where client is an un-trusted application. For instance AngularJs application or phone application etc. Why these clients are called un-trusted because they cannot hide the secrets given/shared by OAuth server.

Let’s have a look at OAuth 2.0 actors in implicit flow.… [Keep reading] “Developing and configuring Multi-tenant applications using AngularJs, WebAPI and Azure Active Directory”

Connecting Azure Mobile Apps and Web Apps to existing on-premises infrastructure using Azure Hybrid Connections

This article describes a very easy and secure way of connecting your Azure Mobile Apps and Azure Web Apps to your existing on-premises infrastructure. The option is called Hybrid Connections and is a feature of Azure BizTalk Services. The feature does not require any VPN configuration or opening Inbound ports on the Firewall. After completion of a few simple configuration steps in the Azure Portal and installation of so-called Hybrid Connection Manager(HCM) program on your on-premises servers, you are ready to consume your on-premises services from your Cloud App right away.… [Keep reading] “Connecting Azure Mobile Apps and Web Apps to existing on-premises infrastructure using Azure Hybrid Connections”

Interacting with Azure Web Apps Virtual File System using PowerShell and the Kudu API

Introduction

Azure Web Apps or App Services are quite flexible regarding deployment. You can deploy via FTP, OneDrive or Dropbox, different cloud-based source controls like VSTS, GitHub, or BitBucket, your on-premise Git, multiples IDEs including Visual Studio, Eclipse and Xcode, and using MSBuild via Web Deploy or FTP/FTPs. And this list is very likely to keep expanding.

However, there might be some scenarios where you just need to update some reference files and don’t need to build or update the whole solution.… [Keep reading] “Interacting with Azure Web Apps Virtual File System using PowerShell and the Kudu API”

How to quickly recover from a FAILED AzureRM Virtual Machine using Powershell

Problem

I have a development sandpit in Azure which I use quite a lot to test and mess with different ideas and concepts. This week when shutting it down things didn’t go that smoothly. All but one virtual machine finally stopped and de-allocated, but one virtual machine just didn’t make it. I tried resizing the VM. I tried changing the configuration of it and obviously tried starting it up many times via the portal and Powershell all without any success.… [Keep reading] “How to quickly recover from a FAILED AzureRM Virtual Machine using Powershell”

Schedule Office 365 PowerShell Tasks Using Azure Automation

Anyone who has used Office 365 knows that just creating your users or syncing them via Azure AD Connect really isn’t enough; instead we almost always have to run scheduled PowerShell scripts to manage tasks such as adding licenses or enabling features, like litigation hold.

Usually I would run these scripts on a management server, or an Azure AD Connect server, but what do you do if you have no on-premises environment? Or no Windows VM’s in Azure?… [Keep reading] “Schedule Office 365 PowerShell Tasks Using Azure Automation”

Exchange in Azure: NIC disabled/in error state

I recently had the need to build my own Exchange server within Azure and connect it to my Office 365 tenant.
I loosely followed the steps in this Microsoft article: https://technet.microsoft.com/library/mt733070(v=exchg.160).aspx to get my Azure (ARM) VMs and infrastructure deployed.

I initially decided to utilise an A1 Azure VM for my Exchange server to reduce my costs, however upon successfully installing Exchange it was extremely slow and basic things like EAC and creating mailboxes would not function correctly due to the lack of resources.… [Keep reading] “Exchange in Azure: NIC disabled/in error state”