Introcution

This document describes the process of using a provided PowerShell script (GetTenantSubscriptionInfo.ps1) to export license details from a Microsoft 365 tenant utilizing Microsoft Graph API. The script generates an Excel file (Microsoft365_Subscriptions.xlsx) containing subscription information necessary for Eden Akers to facilitate tenant migration requests. This guide explains each file involved in the process, their specific roles, and how they interact to produce the required data.


Please note that to run the script efficiently we need the Tenant-ID of your current distributor.


Files Overview

Main Script: GetTenantSubscriptionInfo.ps1

The core PowerShell script that authenticates against the Microsoft Graph API, retrieves all active subscription licenses within the logged-in tenant, and consolidates the data into an Excel spreadsheet. It references supporting files to enhance data accuracy and presentation.


Customer Configuration: customername.ini

To properly update the Customer.ini configuration file, before running the script, ensure you have all relevant information at hand. The configuration file must reflect accurate details involved in the transfer process.


Updating the INI file:

  1. Open the Customer.ini file in a text editor (e.g., Notepad or Visual Studio Code).

  2. Replace the placeholder values with the accurate customer-specific information:

    • CustomerName: Contains your companies name as known with Microsoft.

    • CustomerAccountID: This value is provided by Eden Akers.

    • ContactPersonEmailforTransfer: Provide a valid email address for the person that can be contacted about the transfer

    • CurrentLicenseDistributor: Specify name the current license distributor.

    • CurrentDistributorTenantID: Replace with the actual tenant ID from the current distributor.

  3. Ensure the information is verified and accurate.

  4. Save the file after editing.


Product Name Reference: ProductNameLookup.csv

A CSV file based on the Microsoft Licensing Service Plan Reference. It maps Microsoft's internal product and service plan identifiers to human-readable product names, essential for clarity within the generated report.


Output File: Microsoft365_Subscriptions.xlsx

The final Excel report generated by the main script. This document includes comprehensive details regarding the subscriptions, licenses, and corresponding service plans active within the tenant. This file should be provided to Eden Akers to proceed with migration planning and execution.


Running the PowerShell Script

To execute the provided PowerShell script, follow these steps:

  1. Open a PowerShell window with administrative privileges (required to install the used PowerShell Modules).

  2. Navigate to the directory containing the script (GetTenantSubscriptionInfo.ps1).

  3. Ensure you have an (admin) account available with necessary permissions and have logged in with credentials having the appropriate rights to query Microsoft Graph.

  4. Execute the script by running the following command:

    .\GetTenantSubscriptionInfo.ps1 -inifile customername.ini
  5. Once the script completes, the Excel report (Microsoft365_Subscriptions.xlsx) will be generated in the script's directory. This file can be send to Eden Akers to start the transfer with