---
title: Other Mailbox Errors
slug: other-mailbox-errors
docTags: 
createdAt: 2025-06-11T20:26:21.330Z
---

## The term 'Add-MailboxPermission" is not recognized as a name of a cmdlet, function, script file, or executable program.

This error occurred during the PostCreateScript of Create Mailbox task.

This was identified as a bug in determining the correct exchange server to execute the cmdlet against.  It would always route to Office365 exchange server, when we wanted to route it to a specific ExchangeServer with the appropriate PSCredentials parameter.  

We worked around it by copying the PSCredentials from the correct Exchange Server Resource to the Office365 Exchange Server Resource.  This issue doesn't apply to single tenant environments.  PR#35417 has been raised to address this issue.

Another cause of this issue could be ExchangeServer setup, ensure your Office365 exchange servers under **//Resources/Exchange Servers&#x20;**&#x68;ave IdentityProvider parameters that point at the appropriate identity provider, e.g. **=//Resources/Active Directory/External Directories/Azure**

##

