Extract the Immutable ID for an Office 365 user

There are many reasons why you may need this value and in my case its for Okta.
Connect to O365 and substitute the username for the user required:

Get-MsolUser -UserPrincipalName "username@domain.com" | Select-Object ImmutableID