Comments on: Time Running Out for AzureAD and MSOL PowerShell Modules https://office365itpros.com/2023/04/04/azuread-powershell-retirement/?utm_source=rss&utm_medium=rss&utm_campaign=azuread-powershell-retirement Mastering Office 365 and Microsoft 365 Tue, 02 Apr 2024 22:01:54 +0000 hourly 1 By: Publishing Technical Web Sites Requires Editorial Oversight - RSSFeedsCloud https://office365itpros.com/2023/04/04/azuread-powershell-retirement/#comment-11228 Tue, 12 Sep 2023 17:40:12 +0000 https://office365itpros.com/?p=59646#comment-11228 […] Online Services module to assign licenses to new user accounts. This is in spite of the fact that MSOL cmdlets that assign licenses don’t work anymore (as some are discovering to their discomfort). For the last two years, Microsoft has advised […]

]]>
By: Tony Redmond https://office365itpros.com/2023/04/04/azuread-powershell-retirement/#comment-11033 Thu, 17 Aug 2023 14:32:21 +0000 https://office365itpros.com/?p=59646#comment-11033 In reply to Girish Negi.

I imagine that you can do a search for “assign licenses with Microsoft Graph PowerShell SDK” and find articles to explain how to do what you want, including articles that I have written.

]]>
By: Girish Negi https://office365itpros.com/2023/04/04/azuread-powershell-retirement/#comment-11032 Thu, 17 Aug 2023 13:54:47 +0000 https://office365itpros.com/?p=59646#comment-11032 Hi Sir, i was using this script for assign bulk user license but its now not working : —
====================================
$AccountSkuId = “EXAMPLE:DESKLESSPACK”
$UsageLocation = “GB”
$Users = Import-Csv C:\Users\girin\OneDrive\Desktop\UPN.csv -delimiter “,”
$Users | ForEach-Object {
$_.UserPrincipalname
Set-MsolUser -UserPrincipalName $_.UserPrincipalName -UsageLocation $UsageLocation
Set-MsolUserLicense -UserPrincipalName $_.UserPrincipalName -AddLicenses $AccountSkuId
}

====================================

Please can you help me to correct this script and share it back

thanks

]]>
By: Tony Redmond https://office365itpros.com/2023/04/04/azuread-powershell-retirement/#comment-10853 Sat, 15 Jul 2023 16:18:07 +0000 https://office365itpros.com/?p=59646#comment-10853 In reply to Linda.

What kind of Excel sheet with what data?

]]>
By: Linda https://office365itpros.com/2023/04/04/azuread-powershell-retirement/#comment-10851 Sat, 15 Jul 2023 15:42:38 +0000 https://office365itpros.com/?p=59646#comment-10851 In reply to Tony Redmond.

Any example of Excel sheet ?

]]>
By: Tony Redmond https://office365itpros.com/2023/04/04/azuread-powershell-retirement/#comment-10846 Fri, 14 Jul 2023 22:19:15 +0000 https://office365itpros.com/?p=59646#comment-10846 In reply to Topher.

As a Microsoft person might say: “thank you for your feedback…”

]]>
By: Topher https://office365itpros.com/2023/04/04/azuread-powershell-retirement/#comment-10845 Fri, 14 Jul 2023 20:48:19 +0000 https://office365itpros.com/?p=59646#comment-10845 I find myself *very* conflicted about Microsoft’s push to retire the Azure AD module and move to the Microsoft Graph modules. On the one hand, there are a few places where the Mg module solves major headaches with the Azure AD modules. On the other hand, the number of Mg modules that are still missing functionality (or force you to fall back to essentially interacting directly with the Graph API via PowerShell) are really frustrating. Multiple Mg modules are still basically unusable. . . and that’s without getting into the abysmal state of the documentation.

It kinda feels like Microsoft is saying, “Helo! We’re going to take away some of your most useful tools shortly. However, don’t worry, we’re going to replace them with “new” tools, and the new tools will have features your current tools don’t have! Admittedly, many of those features don’t exist or don’t work yet. Also, some of the new tools aren’t actually usable tools yet, they’re just pictures of tools we’ll give you later. Probably. And, some of the tools are missing important pieces. Don’t worry, though; a hammer can still be useful, even if it doesn’t have a handle yet. And this drill will amaze you once we add the battery and drill bits! Also, we only have 12 pages out of the 500 page instruction manual written right now. You have until next week to stop using your existing tools (date subject to change at our whim).

]]>
By: Tony Redmond https://office365itpros.com/2023/04/04/azuread-powershell-retirement/#comment-10832 Wed, 12 Jul 2023 21:52:15 +0000 https://office365itpros.com/?p=59646#comment-10832 In reply to linda.

The solution is to use the Microsoft Graph PowerShell SDK to apply licenses. https://practical365.com/microsoft-365-license-graph-sdk/

]]>
By: linda https://office365itpros.com/2023/04/04/azuread-powershell-retirement/#comment-10831 Wed, 12 Jul 2023 21:13:44 +0000 https://office365itpros.com/?p=59646#comment-10831 Hi, Any solution for this ? I tried to apply license for all users in bulk in exchange, but its returning with error

Set-MsolUserLicense : You have exceeded the maximum number of allowable transactions. Please try again later.
At line:1 char:60
+ … | foreach {Set-MsolUserLicense -UserPrincipalName $_.UserPrincipalNa …

]]>
By: Tony Redmond https://office365itpros.com/2023/04/04/azuread-powershell-retirement/#comment-10417 Tue, 16 May 2023 15:45:05 +0000 https://office365itpros.com/?p=59646#comment-10417 In reply to J Stewart.

There isn’t one yet. But that’s OK because Start-ADSyncSyncCycle doesn’t do anything with licenses, which is the first problem that people will run into. A replacement will come in due course.

]]>
By: J Stewart https://office365itpros.com/2023/04/04/azuread-powershell-retirement/#comment-10412 Tue, 16 May 2023 12:42:01 +0000 https://office365itpros.com/?p=59646#comment-10412 What is the equivalent of Start-ADSyncSyncCycle Delta?

]]>
By: April 8, 2023 - Red-N Security https://office365itpros.com/2023/04/04/azuread-powershell-retirement/#comment-10052 Sat, 08 Apr 2023 22:08:28 +0000 https://office365itpros.com/?p=59646#comment-10052 […] Azure AD PowerShell Deprecation – Last Gasp for Cmdlets […]

]]>
By: Tony Redmond https://office365itpros.com/2023/04/04/azuread-powershell-retirement/#comment-10029 Thu, 06 Apr 2023 10:25:58 +0000 https://office365itpros.com/?p=59646#comment-10029 In reply to Peter.

The Microsoft documentation says (for using a password profile):

In delegated access, the calling app must be assigned the Directory.AccessAsUser.All delegated permission on behalf of the signed-in user. In application-only access, the calling app must be assigned the User.ReadWrite.All application permission and at least the User Administrator Azure AD role.

Are you doing this interactively or using a program (delegated or application)? That might account for the difference.

]]>
By: Tony Redmond https://office365itpros.com/2023/04/04/azuread-powershell-retirement/#comment-10028 Thu, 06 Apr 2023 10:19:53 +0000 https://office365itpros.com/?p=59646#comment-10028 In reply to Peter.

I think that Directory.ReadWrite.All is a better permission to uss. Directory.AccessAsUser.All is accessing the directory as a user and you’d imagine that the Directory.ReadWrite.All is more appropriate because it’s an admin activity. https://graphpermissions.merill.net/permission/Directory.AccessAsUser.All. In any case, you have a solution…

]]>
By: Peter https://office365itpros.com/2023/04/04/azuread-powershell-retirement/#comment-9999 Tue, 04 Apr 2023 14:58:05 +0000 https://office365itpros.com/?p=59646#comment-9999 In reply to Tony Redmond.

Never mind I found it needed this as well:
Directory.AccessAsUser.All

]]>
By: Peter https://office365itpros.com/2023/04/04/azuread-powershell-retirement/#comment-9998 Tue, 04 Apr 2023 14:33:41 +0000 https://office365itpros.com/?p=59646#comment-9998 In reply to Tony Redmond.

What you sent didn’t work on PowerShell 5.1. But it led me to another article that worked:
https://learn.microsoft.com/en-us/graph/api/user-update?view=graph-rest-1.0&tabs=powershell#example-3-update-the-passwordprofile-of-a-user-to-reset-their-password

$PasswordProfile = @{
ForceChangePasswordNextSignIn = $false
Password = “riverD@0404”
}
Update-MgUser -UserId $UserId -PasswordProfile $PasswordProfile

Do you know why this worked better? I’m getting a permission error and the scopes I have should provide everything. User.ManageIdentities.All, User.EnableDisableAccount.All, User.ReadWrite.All, Directory.ReadWrite.All

Not sure how to get the permissions to test this.

]]>
By: Tony Redmond https://office365itpros.com/2023/04/04/azuread-powershell-retirement/#comment-9997 Tue, 04 Apr 2023 14:07:28 +0000 https://office365itpros.com/?p=59646#comment-9997 In reply to Peter.

Sure. Use the setting in the password profile used as the input to the Update-MgUser cmdlet to avoid resetting the password.

$NewPassword[“Password”]= “!NewYorkCity2022?”
$NewPassword[“ForceChangePasswordNextSignIn”] = $false
Update-MgUser -UserId $UserId -PasswordProfile $NewPassword

For more details on the password profile see https://learn.microsoft.com/en-us/graph/api/resources/passwordprofile?view=graph-rest-1.0

]]>
By: Peter https://office365itpros.com/2023/04/04/azuread-powershell-retirement/#comment-9996 Tue, 04 Apr 2023 12:44:45 +0000 https://office365itpros.com/?p=59646#comment-9996 Have you figured out how to reset a user’s password and NOT force a password reset on first signon?

]]>