Therefore, assigning an Exchange Online license to a user will automatically provision a user mailbox. Removing a license with Set-AzureADUserLicense looks something like this. In Office 365, user mailboxes are tied directly to the Office 365 Exchange Online license. 0.7 Removing an Office 365 License from a User Import-Module AzureADPreview –RequiredVersion 2.0. Install-Module -Name AzureADPreview -MinimumVersion 2.0.0.7 -Force -SkipPublisherCheck As I’m messing around in my dev sandpit I skipped the publisher check. And for whatever reason I was getting an error informing me that it wasn’t signed.
If like me you have been experimenting with the AzureADPreview module you’ll need to force the install of the newest one. Now that I have both removing and assigning Office 365 licenses working I’ll save others the pain of working it out and give a couple of working examples. The Set-AzureADUserLicense cmdlet has been my litmus test. Since then the AzureADPreview has gone through a number of revisions and I’ve been messing around a little with each update. And it didn’t work, there was no working examples and I gave up and used GraphAPI instead. The first cmdlet that I experimented with was Set-AzureADUserLicense. If you have questions, then just drop a comment below.A couple of months ago the AzureADPreview module was released.
If you want to check the MFA status of your users then make sure you read this article which includes a free script to get and export the MFA status of all or a single users. You can now also improve the MFA security by requiring a number validation or by showing the request location, read more about these new features in this article. Using PowerShell you can quickly disable MFA in Office 365, but keep in mind that accounts without MFA are vulnerable for phishing attacks.
Click on Disable on the right side, below Quick Steps.Select the user for which you want to disable MFA.The downside is that is sometimes takes a couple of minutes before it’s processed, but that is not a big deal. If you don’t like to use PowerShell then it’s also possible to disable MFA in Office 365 through the Microsoft 365 Admin Center. To enable MFA again you can either use the admin center or this PowerShell script.Īgain, if you want to disable it for all users, simply change the Get-MsolUser cmdlet: Get-MsolUser -All | Set-MsolUser -StrongAuthenticationRequirements Using the Microsoft 365 Admin Center to disable MFA Then we can remove the strong authentication requirements for the user in question: Get-MsolUser -UserPrincipalName | Set-MsolUser -StrongAuthenticationRequirements user can now log in to the Microsoft 365 service without the needs for MFA authentication. # If you don't have the MsolService module installed, then install it with: In some case you might need to turn it off for a couple of days until the user receive a new phone, for example.įor this we are also going to use PowerShell, which I personally find faster to work with then navigating through the admin center.įirst, connect to the Microsoft Online Service Connect-MsolService I don’t recommend to keep the MFA disabled for a longer period. It’s also possible to completely disable MFA for a user. If you want to disable MFA temporarily for all users you can simply change the Get-MsolUser cmdlet: Get-MsolUser -All | Set-MsolUser -StrongAuthenticationMethods Completely Disable MFA for a Single User in Office 365
After entering the username and password the user is requested to enter more information to set up the MFA again. Get-MsolUser -UserPrincipalName | Set-MsolUser -StrongAuthenticationMethods user can now log in again into Office 365. We do this by setting an empty list for the authention methods. We can now lookup the user and remove the authentionmethods. Step 2 – Get the user and remove authentication methods