Office 365 fallback from ADFS to Password Sync with ADFS down

Because I’ve been asked too many times and keep having to look up the commands, I’m just going to throw them here for reference. If your ADFS farm, federated with Office 365, goes down for some reason and is no longer reachable, the Microsoft way of unfederating your Office 365 logon domain won’t work, as the set-msoladfscontext command won’t be able to reach your ADFS machine.

Simply setting the domain’s authentication mode from Federated to Managed will also do the trick and allow your users to login with their synced passwords:

Import-Module MSOnline
Connect-MsolService
Set-MsolDomainAuthentication -Authentication Managed -DomainName yourlogondomain.com

Programmatically enabling or disabling the Unified Audit Log in Office 365

For our enrollment process of customers in Office 365, we enable the Unified Audit Log by default, as this has a great number of benefits.

At first, the only way to do this was through the UI, but now we can enable the Unified Audit Log with the following  Powershell command in the Exchange Online Remote Shell:

Set-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled:$True

Or to disable the Unified Audit Log through Powershell:

Set-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled:$False

Note that disabling the Unified Audit Log can only be done through Powershell.

OnedriveMapper v2.36 released!

Version 2.36 of OneDriveMapper has been released!

  • Now supports automatically redirecting the My Documents folder to Onedrive For Business (Win7/Win2k8R2 only)
  • Now automatically sets your Onedrive folder as the ‘home’ folder
  • Better logic in redoing drive labels

Get the new version here

Do not forget to enable the Unified Audit Log

Office 365 and all related services have various forms of auditing options, it’s a pain to monitor and configure them all.

A while back, Microsoft unified these auditing logs into the Unified Audit Log. The Unified Audit Log for Office 365 is super easy to configure.

For all my customers I always enable this free feature, it is pretty much the only way you can have a RPO of 0 when you need to undo changes / deletes or restore data, and gives you a very nice and compliant audit log of everything your users and admins do in your environment.

In addition, it allows me to help you automatically reverse nasty CryptoLocker actions like mass file and folder renames and restore previous versions in bulk.

edit: you can also enable the audit log programatically

Microsoft 365, Azure, Automation & Code