MS365 – Azure AD – Dynamic Groups and Expiration Settings

Maintain groups in Azure AD with dynamic groups and set expiration settings.

Example scenario : Controlling remote access to sub contractors working on a short term project. The project owner should remove all access for sub contractors after the project completes

How to guide :

If we combine Dynamic Groups and Expiration settings, we can automatically populate groups and then invoke regular check to maintain groups are still required. Group owners will be reminded regularly to verify groups are required. Owners will have a better understanding of who has access and this help assist with your security policies.

Dynamic Group Example

Steps: Azure Active Directory > New Group > Type : Office 365 > Name, Description, Dynamic User > Owner > Dynamic user Members

Group Name : Sub Contractors    – Set the value for department equals “Sub Contractor”

Dynamic User Members    – Add Experssion

(user.department -eq “Sub Contractor”)

Configure Group lifetime / Expiration Settings

Steps: Azure Active Directory > Groups > Expiration > Days > No Owner email > Selected > Group > Save

“Renewal notifications are emailed to group owners 30 days, 15 days, and one day prior to group expiration. Group owners must have Exchange licenses to receive notification emails. If a group is not renewed, it is deleted along with its associated content from sources such as Outlook, SharePoint, Teams, and PowerBI.” Info from the portal Expiration settings.

Azure – Register An Application in AD and Generate App Password

How to guide, in Azure register an application in AD and generate app password

In the Azure portal, browse to Azure Active Directory > App Registrations

New Registration

Enter Application details and account types

Next Click > Certificates & Secrets > New client secret

Enter description and Expirey > Click Add

Make sure to copy the value. You can then sign in as the application with the App ID and value.

Azure Conditional Access Policies – Greyed Out

Problem : Azure Conditional Access + “New policy” is greyed out.

Reason : To use Azure Conditional Access Policies, you require “Azure AD Premium”

Solution : License and Setup Azure AD Premium. You are able to setup Azure AD Premium on a 30 Day trial before incurring additional costs

Activate using Free 30 day trial option shown below.