Set expiration for Microsoft 365 groups

Reading Time: 3 minutes

In this blog post I will go through the process of enabling 365 Group expiration. I will also assign a default owner to 365 groups where no owner exists.

Please note:

  • Groups with user activities are automatically renewed as the expiration nears so the group will not be deleted unless there is no user activity. With Azure AD intelligence, groups are now automatically renewed based on whether they have been recently used. This feature eliminates the need for manual action by group owners, because it’s based on user activity in groups across Microsoft 365 services like Outlook, SharePoint, or Teams. For example, if an owner or a group member does something like upload a document in SharePoint, visit a Teams channel, or send an email to the group in Outlook, the group is automatically renewed and the owner does not get any renewal notifications.
  • Owners of the group are notified to renew the group, if the group is not auto renewed, for example, no user activity.
  • Any group that is not renewed is deleted and can be be restored within 30 days by the group owners or the administrators.
  • You can only set an expiration policy for Microsoft 365 groups in Azure AD
  • Currently, only one expiration policy can be configured for all Microsoft 365 groups in an Azure AD organisation
  • Configuring and using the expiration policy for Microsoft 365 groups requires you to possess but not necessarily assign Azure AD Premium licenses for the members of all groups to which the expiration policy is applied.
  • When you first set up expiration, any groups that are older than the expiration interval are set to 35 days until expiration unless the group is automatically renewed or the owner renews it
  • When a dynamic group is deleted and restored, it’s seen as a new group and re-populated according to the rule. This process can take up to 24 hours.
  • Expiration notices for groups used in Teams appear in the Teams Owners feed.
  • If groups are not automatically renewed, email notifications are sent to the Microsoft 365 group owners 30 days, 15 days, and 1 day prior to expiration of the group
  • Owners are sent an email to confirm when the group is deleted with the option to click a link to restore the group for up to 30 day
  • When a group expires and is deleted, 30 days after deletion the group’s data from apps like Planner, Sites, or Teams is permanently deleted, but the group mailbox that is on legal hold is retained and is not permanently deleted.
  • If you have set up a retention policy for Microsoft 365 groups, when a group expires and is deleted, the group conversations in the group mailbox and files in the group site are retained in the retention container for the specific number of days defined in the retention policy. Users won’t see the group or its content after expiration, but can recover the site and mailbox data via e-discovery.

Let’s get started with configuring Microsoft 365 group expiration

  1. Login to the Azure Portal portal.azure.com
  2. Click Azure AD or browse and click using the search box
  3. Click Groups

4. Click Expiration

5.

– Specify the number of days for group expiry
– Add a contact email address or use several email addresses by separating them with a semicolon ;
– If you wish to apply the policy to all 365 groups, select All
– If you wish to select a number of 365 groups, click Selected and locate the groups you would like to apply the expiration policy.


Remove Microsoft 365 group expiration policy

In the event you need to remove the policy

  1. Select Azure Active Directory > Groups > Expiration
  2. Set Enable expiration for these Microsoft 365 groups to None

Part 1: Terraform with Azure – How to install Terraform

Reading Time: 3 minutes

Welcome to part 1 of Terraform on Azure. My journey on learning Terraform to allow me to automate workloads within Microsoft Azure. If you’ve not already done so, please subscribe to stay up to date on the latest blog posts.

Let’s get started 🙂

What is Terraform?
Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions. Terraform is a tool and also a language. That language is called Hashicorp Config language (HCL). Terraform is written in Go (also known as GoLang) is an open-source programming language designed by Google.

Configuration files describe to Terraform the components needed to run a single application or your entire datacenter. Terraform generates an execution plan describing what it will do to reach the desired state, and then executes it to build the described infrastructure. As the configuration changes, Terraform is able to determine what changed and create incremental execution plans which can be applied.

Terraform can be used to automate the provisioning of cloud infrastructure. Terraform will allow you to write and deploy your cloud infrastructure setup in code. If you have experience with Microsoft Azure or other cloud providers such as AWS, Google Cloud etc, you will know that deploying infrastructure using the Microsoft Azure Portal is a manual and repetitive task which an be time consuming. Terraform helps automate your builds by using Infrastructure as Code, rather than manually going through the steps in the portal.

How to install Terraform?

1) Visit https://www.terraform.io/
2) Click download

3) Select your operating system. I’ll be selecting Windows for this demo

4) Download Terraform 32 or 64 bit depending on your requirements

5) Extract the file

6) Next add the .exe to the path within Windows – click the start menu, search and click view advanced system settings

7) Click Environmental Variable

8) Click path and click edit

9) Click new

10) Type the path to the Terraform folder you created

11) Click OK, OK and OK

12) To check the change you implemented works, launch powershell or command prompt

13) Type terraform and press enter.

You should receive a similar output to the one below

In part 2, I go through the process of installing a useful tool known as Azure CLI, click the following link to continue on my journey, Part 2: Terraform with Azure – how to install Azure CLI

DsReplicaGetInfo Failed with status 8453 <0x2105>

Reading Time: < 1 minute

When running DCDiag via a command prompt, you receive the error below:

Note: Dcdiag is a Microsoft Windows command line utility that can be utilised to analyse the state of domain controllers in your environment.

Error: DsReplicaGetInfo Failed with status 8453 <0x2105>. Replication access was denied.

Before you start investigating replication issues, one of the common causes for this error is that you did not run the command app with administrative privileges.

Open command prompt with administrative privileges

  1. Click the start menu
  2. Type cmd
  3. Hover your mouse pointer over the cmd program and right click
  4. Click the option to run as administrator

Type and run DCDiag again

A short post but it could save you an hour or two of investigation work 🙂

Please comment below if this resolved your issue. Thank you and don’t forget to subscribe.

Assign Azure VM Static IP address

Reading Time: 2 minutes

In this blog post I will assign a server within Azure a static IP address. By default all servers obtain an IP automatically.

Please note: You can not assign a server in Azure a static IP from within the OS. This will cause communication issues between the Azure agent on the server and Azure.

You may also want to check out my recent blog posts if you’re just starting out:

– How to Add a custom domain to Azure AD
– How to create a VNET in the Azure Portal
– How to configure Azure Bastion
– How to build a server in the Azure Portal

OK, so let’s get started

  1. Login to the Azure portal at portal.azure.com
  2. Select virtual machines from the left pane or use the search bar.

3. Click on the virtual server

4. Click Networking

5. Click the Network Interface

6. Click IP Configurations from the left pane

7. Click ipconfig1

8. Switch from dynamic to static

9. Click save

That’s it. Thanks for visiting.

Stay tuned for the next blog post

How to install AZ Module within PowerShell

Reading Time: < 1 minute

1) Firstly download and install the latest stable version of PowerShell to your device. You can download the latest version from:

https://github.com/powershell/powershell#get-powershell

To check the version of PowerShell you currently have installed, launch PowerShell, run the command below:

Get-Host | Select-Object Version

2) Now that you have the latest version of PowerShell installed, you will need to install the AZ module if not already installed. The command below will allow you to check if you already have the AZ Module installed including the version number.

Get-Module -Name Az -ListAvailable

3) If you already have the AZ module installed, the version will appear. If no version is installed, no results will appear after running the above command. You may find that you have more the one version installed.

To install the latest version, type the command below:

Install-Module -Name Az -AllowClobber

Please note, if you already have older versions of the Az Module installed, you may wish to add -force to the end of the command so that the module installs side by side with your existing versions. Such as:

Install-Module -Name Az -AllowClobber -force

Installing the module will take about a minute. Run the command below again to confirm the module has installed

Get-Module -Name Az -ListAvailable

If you have multiple versions of the AZ Module installed, the latest version will be used by default, unless you specify for an older version to be used.