Exchange online permission error

Brass Contributor


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: . 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.

1 Reply
best response confirmed by brogyi (Brass Contributor)
My problem was that I used domainname to connect, not There was a hint in some Microsoft documentation.