Microsoft 365 administrators need to track Copilot licensing costs by department or project. Without proper mapping, finance teams cannot allocate expenses accurately. This article explains how to assign Copilot licenses to specific cost centers using Azure Active Directory attributes and Microsoft 365 admin tools. You will learn the prerequisite steps, the exact configuration process, and common pitfalls to avoid.
Key Takeaways: Mapping Copilot Licenses to Cost Centers
- Azure AD custom attributes (extensionAttributes1–15): Store cost center codes on each user object for license tracking.
- Microsoft 365 admin center > Billing > Licenses: View assigned Copilot licenses and export user lists with cost center data.
- PowerShell script with Microsoft Graph: Automate license assignment and cost center synchronization across large user groups.
What You Need Before Mapping Licenses
Mapping Copilot licenses to cost centers requires a consistent identifier on each user account. Azure Active Directory provides built-in extension attributes that can store cost center codes. You must have at least the User Administrator role in Azure AD to modify user attributes. The Global Administrator role is required to assign Copilot licenses at the tenant level. Ensure your finance team has agreed on a standard cost center naming convention such as department codes or project IDs.
Copilot for Microsoft 365 licenses are assigned per user. Each user account can hold one or more extension attributes. The attribute you choose must be populated before or at the time of license assignment. If you use an automated provisioning system like Microsoft Entra ID Governance or a third-party HR tool, verify that it writes the cost center value to the correct attribute.
Steps to Assign Cost Center Attributes to Users
Follow these steps to add cost center codes to user accounts and then assign Copilot licenses. You can perform these actions in the Azure portal, the Microsoft 365 admin center, or with PowerShell.
Method 1: Using the Azure Portal
- Sign in to the Azure portal
Go to portal.azure.com and sign in with a Global Administrator or User Administrator account. - Navigate to Azure Active Directory
Select Azure Active Directory from the left menu. Then choose Users under the Manage section. - Select a user
Click on the user you want to update. In the user profile, select Edit properties. - Set the extension attribute
Scroll to the Extension attributes section. Enter the cost center code in one of the fields labeled extensionAttribute1 through extensionAttribute15. For example, use extensionAttribute1 for department code. - Save the changes
Click Save at the top of the page. The attribute is now stored on the user object.
Method 2: Using Microsoft 365 Admin Center
- Sign in to the Microsoft 365 admin center
Go to admin.microsoft.com and sign in with a Global Administrator account. - Go to Billing > Licenses
Select Billing in the left navigation, then choose Licenses. - Select the Copilot product
Click on Copilot for Microsoft 365 from the list of license products. - Assign licenses with cost center data
Click Assign licenses. In the panel, search for users or select them from the list. The admin center does not directly show extension attributes. You must populate the attributes in Azure AD first. Then, when you export the license report, the attributes appear in the exported CSV file. - Export license report
After assigning licenses, go back to the Licenses page. Click Export to download a CSV file. Open the file in Excel. The extension attributes you set in Azure AD will be included in columns labeled extensionAttribute1 through extensionAttribute15.
Method 3: Using PowerShell with Microsoft Graph
- Install the Microsoft Graph PowerShell module
Open PowerShell as an administrator. RunInstall-Module Microsoft.Graph -Scope CurrentUser. Confirm any prompts. - Connect to Microsoft Graph
RunConnect-MgGraph -Scopes "User.ReadWrite.All", "Organization.Read.All". Sign in with a Global Administrator account. - Update a user’s extension attribute
Use the following command to set the cost center attribute. Replaceuser@domain.comwith the user’s UPN andCC123with your cost center code.Update-MgUser -UserId "user@domain.com" -ExtensionAttribute1 "CC123" - Assign the Copilot license
First, get the SKU ID for Copilot. RunGet-MgSubscribedSku | Where-Object {$_.SkuPartNumber -eq "COPILOT_M365"}. Note the SkuId value. Then assign the license:Set-MgUserLicense -UserId "user@domain.com" -AddLicenses @{SkuId = "your-sku-id"} -RemoveLicenses @() - Verify the assignment
RunGet-MgUserLicenseDetail -UserId "user@domain.com"to confirm the Copilot license is active. Check the extension attribute withGet-MgUser -UserId "user@domain.com" -Property ExtensionAttribute1.
Common Mistakes and How to Avoid Them
Cost center attribute is empty on new users
If you assign a Copilot license before setting the extension attribute, the license report will show a blank for that user. Always populate the cost center attribute before or at the same time as the license assignment. Use automated provisioning rules in Microsoft Entra ID Governance to write the attribute when a new user is created.
Using the wrong attribute name in PowerShell
The extension attribute names in the Microsoft Graph API are case-sensitive. Use extensionAttribute1 exactly as shown. If you type ExtensionAttribute1 with a capital E, the command fails. Refer to the Microsoft Graph documentation for the exact property names.
Export report does not show cost center data
The Microsoft 365 admin center export includes extension attributes only if they are populated on the user object. If the attribute is empty, the column appears blank. Verify the attribute value in Azure AD or with PowerShell before running the export.
Copilot License Mapping Options: Attribute vs Group-Based
| Item | Extension Attribute Method | Group-Based Licensing |
|---|---|---|
| How cost center is stored | Directly on each user object as an extension attribute | Inferred from the Azure AD group name or group metadata |
| Reporting accuracy | High – each user has an explicit code | Medium – requires mapping group names to cost centers externally |
| Automation complexity | Low – single attribute update per user | Medium – requires group membership rules and a separate mapping table |
| License assignment trigger | Manual or scripted based on attribute value | Automatic when user is added to the group |
You can now map Copilot licenses to cost centers using extension attributes in Azure AD. Start by defining a standard cost center code format with your finance team. Then populate the attribute on each user before assigning the Copilot license. Use the PowerShell method for bulk operations and schedule a recurring script to keep the data synchronized. For advanced reporting, combine the extension attribute with a Power BI dashboard that reads the Microsoft 365 license export.