Forum Discussion

brogyi's avatar
brogyi
Copper Contributor
Aug 25, 2022
Solved

Exchange online permission error

Hello!

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.

  • My problem was that I used domainname to connect, not domainname.onmicrosoft.com. There was a hint in some Microsoft documentation.

1 Reply

  • brogyi's avatar
    brogyi
    Copper Contributor
    My problem was that I used domainname to connect, not domainname.onmicrosoft.com. There was a hint in some Microsoft documentation.

Resources