Office 365 – Distribution List Migrations Version 2.0 – Part 34

*IMPORTANT* Preparing for MS Graph Implementations

The DLConversionV2 PowerShell Module has dependencies on Azure Active Directory PowerShell commands. The Azure AD PowerShell commands are started a phased deprecation. The commands are being replaced by Microsoft Graph Commands.

 

When version 2.9.8 releases to the PowerShell Gallery using Microsoft Graph will be the standard method for querying and capturing information from Azure Active Directory. The necessary Microsoft Graph modules will be installed when either a current build is upgraded, or a new build installed.

 

When running DLConversionV2 administrators may use either interactive authentication for graph or certificate authentication. Unfortunately, the method of passing non-interactive credentials for authentication from scripts is not available in the Microsoft Graph modules.

 

DLConversionV2 now has the following switches included to establish the MSGraph session.

 

#Define Microsoft Graph Parameters

        [Parameter(Mandatory = $false)]

        [ValidateSet(“China”,“Global”,“USGov”,“USGovDod”)]

        [string]$msGraphEnvironmentName=“Global”,

        [Parameter(Mandatory=$true)]

        [string]$msGraphTenantID=“”,

        [Parameter(Mandatory=$false)]

        [string]$msGraphCertificateThumbprint=“”,

        [Parameter(Mandatory=$false)]

        [string]$msGraphApplicationID=“”,

 

 

$msGraphEnvironmentName = The specific Office 365 environment if connecting outside of the Global environment.

 

$msGraphTenantID = The Azure Active Directory / Office 365 tenant ID associated with your tenant. This can be obtained from the Azure Portal -> Azure Active Directory.

 

$msGraphCertificateThumbprint = The certificate thumbprint assigned to the local user profile and also assigned to the Microsoft Graph application created in Azure AD.

 

$msGraphApplicationID = The application of the application created in Azure Active Directory for Microsoft Graph.

 

The above four switches are required to have a migration performed in a non-interactive authenticated session. If performing a single distribution list migration the switches can be omitted at which time an interactive authentication prompt will be presented.

 

To use Microsoft Graph either the application you are connecting to or the user account you are using has to consent to access and request certain rights. The minimum rights required for the DLConversionV2 module are Group.Read.All and User.Read.All. You may have to work with others in your organization to consent to these rights when connecting to Microsoft Graph.

 

As most migrations are performed in a non-interactive format I suggest reading the following blog post: Using Certificate-based Authentication with the Microsoft Graph PowerShell SDK | Practical365

 

The blog post by Tony Redmond presents an easy process for establishing your Azure Active Directory application and implementing certificate authentication for connections to Microsoft Graph. It also provides a simple command structure to test your installation.

 

I know for many this will break processes that are already in flow. The decision is not taken lightly but is required to allow sufficient time to move forward on supported APIs and continue the development of the modules.

 

Happy migrating!

5 thoughts on “Office 365 – Distribution List Migrations Version 2.0 – Part 34

  1. Pingback: Office 365 – Distribution List Migration – Version 2.0 | TIMMCMIC

  2. write2tsm

    Hi Timmcmic

    I’m in process of planning bulk DL conversion to cloud.

    Have read this article and the reference article (https://practical365.com/use-certificate-authentication-microsoft-graph-sdk/) got the following questions:

    1. Is certificate-based authentication the only option for bulk DL conversion?
    2. Can we use a self-signed certificate for a production DL conversion?
    3. The reference article creates uses the -DnsName parameter (with a value of office365itpros.onmicrosoft,com) to create the self-signed certificate. What does this name represents?

    Thanks

    Like

    Reply
  3. TIMMCMIC Post author

    write2tsm…

    1 – yes. MSGraph does not support the user of a -credentials parameter. So graph can either login interactively (single DL migration) or using certificate authentication (multiple migrations / single migrations).

    2) Yes! Absolutely. I would totally recommend reviewing this guide by Tony Redmond. https://practical365.com/use-certificate-authentication-microsoft-graph-sdk/

    3) You would use your domain in there. I use a routable email domain in mine, you could also use your onmicrosoft.com domain. An onmicrosoft.com domain is assigned to every tenant. That is just an example that tony used from his lab I believe.

    Like

    Reply

Leave a comment