Automating certificate rollover for Azure AD applications using Azure Functions and KeyVault

There are several documentation pages on docs.microsoft.com on managing application registration certificate rollover, including several github repos from Microsoft, all of which are either using a silly approach with high privileged user account (Global Admin, Application Admin, etc) or does not delve into details on how to solve the issue with least privilege and in a proper automated fashion when using KeyVault.

In this post I will try to document a few of the things I have experienced while implementing this using the addKey Graph endpoint.

Continue reading “Automating certificate rollover for Azure AD applications using Azure Functions and KeyVault”

Nudging users to adopt Microsoft Authenticator using registration campaigns

As usual when a new Microsoft Graph endpoint is released, I do some digging using Graph Explorer. Not rocket science, but some times I find very interesting stuff, and this time I have found something.

Let’s say you have 1000 users curretly using SMS for Multi-Factor Authentication, and you want to get them to use the Microsoft Authenticator app instead. What do you do? Do you send out emails, checking the current rollout status using the microsoftAuthenticatorAuthenticationMethod endpoint of each user? Sure, today you do, but there is a secret feature available that some time in the future will help you out. Registration campaigns!

Continue reading “Nudging users to adopt Microsoft Authenticator using registration campaigns”

Creating a user and assigning it to an Azure AD role using Microsoft.Graph PS Module

Going forward, the Azure AD PowerShell Module will not be updated, and Microsoft has stated that it is the Microsoft.Graph PowerShell Module that will be used. This makes sense, as this is auto-generated based on the Microsoft Graph Odata, not requiring Microsoft to maintain several things. However, right now, some of the PowerShell verbs are not really following best practices. Anyway, here is how to do some simple things 🙂

Continue reading “Creating a user and assigning it to an Azure AD role using Microsoft.Graph PS Module”

Azure AD CA Authentication Context, a look a tokens

Azure AD Conditional Access has been quite powerful for a long time, but just got way better with the new authentication context feature. Authentication context is essentially a new way to scope conditional access policies, where instead of targeting an application, you target a context, such as “High security operations” or “Operations requiring consenting to terms of use”. Using the authentication context, you can split your applications into several assurance levels, each being targeted by a separate set of CA policies.

Let’s have a look at the tech first, with tokens and stuff.

Continue reading “Azure AD CA Authentication Context, a look a tokens”

Script for determining unused distribution groups in Exchange Online

A common problem when creating just about any resource in Active Directory, Exchange Online, Azure AD, SharePoint, etc. is life cycle. I see so many customers that have no control over their distribution groups. This is a script that you can use to determine which if your distribution groups are in use, and which are not, by looking at the message trace for the last 90 days.

Continue reading “Script for determining unused distribution groups in Exchange Online”

Using Microsoft Graph to get all guests from Azure AD, including those with userType set to “Member”

Shortest blogpost that will ever be on this blog. Here is a url you can use to get all guests from your Azure AD, including those you have set userType to “Member” for, for different reasons:

https://graph.microsoft.com/beta/users?$filter=creationType eq 'Invitation' or userType eq 'Guest' or externalUserState eq 'Accepted' or externalUserState eq 'PendingAcceptance'

Script to add Azure AD gallery apps

The Microsoft Graph endpoint for instantiating Azure AD gallery apps is quite new, and I just needed them in order to instantiate 20+ apps based on the GitHub Enterprise Organization template. Here is my code, if someone has use for it 🙂

I have left out “how to get an access token”. The permissions required is Application.ReadWrite.All.

Continue reading “Script to add Azure AD gallery apps”

Using Azure AD External Identities to power self service sign-in for a web site

With Azure AD External Identities, Microsoft is bringing some of the Azure AD B2C features to “regular” Azure AD, and it is now generally available (GA). With these features, you can add public self service sign up-baed authentication flows to your services, using your existing Azure AD.

Continue reading “Using Azure AD External Identities to power self service sign-in for a web site”