I am using a PowerShell script or least trying... to connect Exchange online. The script connect in non-interactive mode, I am using an Azure application to log in, which I uploaded a certificate, followed from this post: https://adamtheautomator.com/exchange-online-v2/#Setting_Up_App-Only_Authentication_using_PowerShell . I can log in, I can use the Get-mailbox command, but, when I am try to use the set-mailbox I am getting an error:
The application had the Exchange Administrator directory role, but later I upgraded to Global Admin, still I am getting the same error. The only thing I am understanding that there is a permission issue.
Any help would be appreciated.