How Can We Help?
< Back
You are here:

Get refresh token for mailbox counts

With Microsofts new Secure Application Model, the only way to access mailbox count data for tenants under your delegated admin is via a token from Microsofts own Exchange Online Remote Powershell application access. This is their new supported method for partners.

You will only need to go through this process once and save the token into your user account to activate the mailbox count functionality.

  1. Open powershell using ‘run as administrator’ on your computer
  2. Run the command
    install-module partnercenter
  3. Run import-module partnercenter
  4. Click yes to install
    1. If you already have the partnercenter module, use this to update it
    2. update-module partnercenter
  5. Run the command
    $token = New-PartnerAccessToken -Module ExchangeOnline
  6. This will come up with a URL for https://microsoft.com/devicelogin and a code to enter.

    Browse to that URL and enter your code
  7. log in with your account that has access to the partner center
    NOTE: It is critical that you log in with the same account you have used to grant the partner center access to Sync 365 License (We recommend using a dedicated account for this. No license is required in Office 365)
  8. Accept any permissions required by Microsoft and it will complete
  9. Your powershell will now be back to the command line
  10. Run the command
    echo $token.RefreshToken
  11. Copy the whole token that has been outputted
  12. In the Sync365License site, click on Company and select the “Delegated Admin” tab.
  13. Click the “Key” icon next to your username that you used to retrieve the refresh token.
    NOTE: It is critical that you use the same username to generate the refresh token or it will fail.
  14. Paste the token in the “Mailbox Refresh Token” box and click Yes.
    Please ensure there are no spaces at the start or end of the token.
  15. We will now be able to get the mailbox counts for your customers and your custom license use.
  16. You can now go and add a custom license to your customers for syncing

Table of Contents