Bewerken

Delen via


Handling delegation-related errors in EWS in Exchange

Find out how to handle delegation-related errors in applications that you develop by using the EWS Managed API or EWS in Exchange.

If your application uses delegation or adds or removes delegates, you might have to handle delegation-related errors. You can handle these errors at runtime, or while you are developing your EWS application. These errors are defined by the EWS Managed API ServiceError enumeration and the EWS ResponseCode element.

Error Occurs when you try to… Handle it by…
ErrorItemNotFound
ErrorFolderNotFound
Perform an operation on a mailbox, folder, or item that you do not have access to.
Updating the delegate's permissions to enable them to access the folder or item by calling the UpdateDelegates EWS Managed API method or the UpdateDelegate EWS operation, and then retrying the request.
ErrorAccessDenied
Modify an item that you do not have sufficient privileges to modify.
Updating your delegate permissions by calling the UpdateDelegate EWS Managed API method or the UpdateDelegate EWS operation, and then retrying the request.
ErrorDelegateCannotAddOwner
Attempt to add the mailbox owner as a delegate to their own mailbox.
Adding a different user as a delegate, not the mailbox owner.
ErrorDelegateAlreadyExists
Add the delegate when the delegate already exists.
Doing nothing, because the delegate already exists for the mailbox owner. Or, if you're trying to change the permissions of an existing delegate, then use the UpdateDelegates method or the UpdateDelegate operation.
ErrorNotDelegate
Modify delegate permissions for a user who has no delegate permissions for the mailbox.
Adding the user as a delegate for the mailbox before attempting to update or remove their permissions.
ErrorDelegateNoUser
Modify delegate permissions for a user who is not in Active Directory Domain Service (AD DS).
Creating the user in AD DS, or correcting the delegate information in the request.
ErrorSubscriptionDelegateAccessNotSupported
Use a delegate to subscribe to notifications on behalf of the mailbox owner.
Subscribing to notifications as the mailbox owner.
ErrorWrongServerVersionDelegate
Make a request from a delegate that has a different server version than the principal's mailbox server.
Using a delegate or adding a delegate whose mailbox has the same server version as the mailbox owner.
ErrorMissingEmailAddress
Make a request using a delegate account that does not have a mailbox.
Adding a mailbox to the delegate's account.

See also