I need to use Mail.dll IMAP client to download emails from Office365 using OAuth.
When registering service principals in Exchange on step:
Create service principal
New-ServicePrincipal -AppId <APPLICATION_ID> -ServiceId <OBJECT_ID> [-Organization <ORGANIZATION_ID>]
I got an error:
New-ServicePrincipal: The term 'New-ServicePrincipal' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that path is correct and try again.
Do you need to install anything else to make this work?