Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

Exchange Web Service - Read-only permission to root folder - Acces denied

$
0
0

I have a Exchange 2013 environment and want to read a UserConfiguration from the mailbox root folder by using Managed Ews and C#. If the User has FullAccess permission everything is working fine, but I want some users only to be able read that UserConfiguration in the root folder. I want that this users do not have read access to Inbox or Calendar - they should read only the root folder.

My code looks like this:

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013);
service.Url = new Uri(url);

FolderId parentFolderId = new FolderId(WellKnownFolderName.Root, mailbox);
var item = UserConfiguration.Bind(service, name, parentFolderId, UserConfigurationProperties.BinaryData);                                     
I used the Set-MailboxPermission cmdlet to set accessrights to ReadPermission

and Set-MailboxFolderPermission to set accessrights to Reviewers.

I got the following exception...

>> Microsoft.Exchange.WebServices.Data.ServiceResponseException: Access is denied. Check credentials and try again.

Please can you help me?

Thanks, Bernhard








Viewing all articles
Browse latest Browse all 7132

Trending Articles