Comments on: Microsoft 365 License Management for Azure AD Accounts with the Microsoft Graph PowerShell SDK https://practical365.com/microsoft-365-license-graph-sdk/ Practical Office 365 News, Tips, and Tutorials Mon, 20 Nov 2023 11:02:15 +0000 hourly 1 https://wordpress.org/?v=6.3.2 By: Tony Redmond https://practical365.com/microsoft-365-license-graph-sdk/#comment-281515 Mon, 20 Nov 2023 11:02:15 +0000 https://practical365.com/?p=55954#comment-281515 In reply to Pranav P.

There is no link. There are only code examples.

]]>
By: Pranav P https://practical365.com/microsoft-365-license-graph-sdk/#comment-281507 Mon, 20 Nov 2023 09:00:51 +0000 https://practical365.com/?p=55954#comment-281507 can you give the github link to this script

]]>
By: Pranav P https://practical365.com/microsoft-365-license-graph-sdk/#comment-281490 Mon, 20 Nov 2023 07:25:37 +0000 https://practical365.com/?p=55954#comment-281490 Hey i need to assign licenses to multiple users , using csv,can give me the scripts for that

]]>
By: Tony Redmond https://practical365.com/microsoft-365-license-graph-sdk/#comment-277049 Wed, 11 Oct 2023 10:04:57 +0000 https://practical365.com/?p=55954#comment-277049 In reply to Andy Swiffin.

I asked Alex Simons about this recently. The answer from his team is that work is still ongoing to finalize the new product license management platform. When that’s done, they’ll remove the P1 requirement.

]]>
By: Andy Swiffin https://practical365.com/microsoft-365-license-graph-sdk/#comment-277041 Wed, 11 Oct 2023 08:23:12 +0000 https://practical365.com/?p=55954#comment-277041 Whatever happened to the “new license management platform” announced by Alex Simonds here:

https://techcommunity.microsoft.com/t5/microsoft-entra-azure-ad-blog/migrate-your-apps-to-access-the-license-managements-apis-from/ba-p/2464366

in which he says: “Group licensing will be extended. In the new licensing platform, Azure AD Premium or Office 365 E3 will no longer be required to use group-based licensing for license assignments”

?

]]>
By: Tony Redmond https://practical365.com/microsoft-365-license-graph-sdk/#comment-276921 Mon, 09 Oct 2023 15:17:47 +0000 https://practical365.com/?p=55954#comment-276921 In reply to JHH.

Do you mean that you don’t want to see the Set-MgUserLicense cmdlet output anything? If so, just assign the output to a variable:

$Status = Set-MgUserLicense -UserId “$($_.FirstName)@pbiclass.com” -Addlicenses @{SkuId = ‘3b555118-da6a-4418-894f-7df1e2096870’} -RemoveLicenses @()

BTW, I cover bulk assignment in https://practical365.com/bulk-license-assignment-with-the-microsoft-graph-powershell-sdk/

]]>
By: JHH https://practical365.com/microsoft-365-license-graph-sdk/#comment-276916 Mon, 09 Oct 2023 14:29:21 +0000 https://practical365.com/?p=55954#comment-276916 I have a script that pulls from a csv file where I create temp student accounts. I have the script create the account, then change the password, then add office license, then add PBI license. During each license phase assignment every piece of meta information about the account that was assigned a license is displayed. So, student 1 -10 shows me each account meta info and it happens twice since it runs through assigning one license then the other. Below is a snippet of the PBI assignment section (other license assignment section is the same). Looks the same as above in article other than the throttle control statement. Why would all that info be show after each assignment?

#Add Office License
$batchCount = 0
Import-Csv -Path .\PbiXX.csv |
ForEach-Object {
if ($batchCount -eq $batchSize){
Start-Sleep -Seconds $wait
$batchCount = 0
}
Set-MgUserLicense -UserId “$($_.FirstName)@pbiclass.com” -Addlicenses @{SkuId = ‘3b555118-da6a-4418-894f-7df1e2096870’} -RemoveLicenses @()

$batchCount++
}

]]>
By: Tony Redmond https://practical365.com/microsoft-365-license-graph-sdk/#comment-275744 Wed, 27 Sep 2023 22:14:27 +0000 https://practical365.com/?p=55954#comment-275744 In reply to zen.

What’s in $AddLicenses?

What licenses are you attempting to assign?

]]>
By: zen https://practical365.com/microsoft-365-license-graph-sdk/#comment-275739 Wed, 27 Sep 2023 21:15:37 +0000 https://practical365.com/?p=55954#comment-275739 Hi,
when I use this command:
Set-MgUserLicense -UserId $user.Id -AddLicenses $addLicenses -RemoveLicenses @()

I have this error:
Set-MgUserLicense : License assignment failed because service plans 63038b2c-28d0-45f6-bc36-33062963b498,0a4983bb-d3e5-4a09-95d8-b2d0127b3df5 are mutually exclusive Status: 400 (BadRequest)

]]>
By: Tony Redmond https://practical365.com/microsoft-365-license-graph-sdk/#comment-274915 Mon, 18 Sep 2023 11:30:42 +0000 https://practical365.com/?p=55954#comment-274915 In reply to Mike Vega.

https://practical365.com/bulk-license-assignment-with-the-microsoft-graph-powershell-sdk/ is what you need.

]]>