Forum Discussion
Add-PublicFolderClientPermission: Object reference not set to an instance of an object.
Running into an issue with adding public folder permissions in Exchange Online. I've used this PowerShell script for a few years without any issues, but suddenly getting this error no matter what I try. I do have Owner permissions and there are Default and Anonymous permissions on the public folder, tried completely removing and reinstalling the ExchangeOnlineManagement module as well.
Anyone else having this problem?
$PF = Get-MailPublicFolder -Identity "\pf1"
$User = Get-User -Anr "User1"
$AccessRights = @( "ReadItems", "CreateItems", "EditOwnedItems", "EditAllItems", "FolderVisible" )
Add-PublicFolderClientPermission -Identity "\$($PF.Id)" -User $User.UserPrincipalName -AccessRights $AccessRights -Verbose
VERBOSE: Returning precomputed version info: 3.9.2
VERBOSE: Requested HTTP/1.1 POST with 227-byte payload
VERBOSE: Received HTTP/1.1 response of content type application/json of unknown size
VERBOSE: Query 1 failed.
Add-PublicFolderClientPermission: Object reference not set to an instance of an object.
Thank you
3 Replies
- MaluksIron Contributor
I have the exact same issue since last week. Today I've tried to open MS support case and I was led to this screen. Apparently it's a known issue and MS is working on it in the background.
It would be nice that Microsoft at least reflected this in the service health.
- AlexFrancoCopper Contributor
Whatever the issue was appears to be resolved now. Ran the exact same script this morning and it worked just like it always had
Thanks!
- Fav_BlackOccasional Reader
Hello, I'm checking in to know if you've been able to find a fix to this. Thank you