title: Grant FullAccess using EWS API
body: <p>I am trying to implement few of EMS Cmdlets function using C# with out using Powershell commands. 
  How can i achieve following commands functionality in C# using EWS Managed API 2.0.</p>
  
  <p><strong>Grant FullAccess</strong></p>
  
  <pre><code>add-mailboxpermission 'userID-1' -accessrights fullaccess -user 'userID-2'
  </code></pre>
  
  <p><strong>Grant SendOnBehalfOf</strong></p>
  
  <pre><code>get-mailbox 'userID-1' | foreach { $_.GrantSendOnBehalfTo += (Get-Mailbox 'userID-2').Identity; $_ } | Set-Mailbox
  </code></pre>
  
  <p><strong>Grant SendAs</strong></p>
  
  <pre><code>get-mailbox 'userID-1' | add-ADPermission -User 'userID-2' -extendedrights 'Send As'
  </code></pre>
  
  <p>Thanks</p>