Get refresh token for mailbox counts

You are here:
< Back

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 as administrator on your computer
  2. Run the command
    install-module partnercenter
  3. Click yes to install
    1. If you already have the partnercenter module, use this to update it
    2. update-module partnercenter
  4. Run the command
    $token = New-PartnerAccessToken -Module ExchangeOnline
  5. 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
  6. 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)
  7. Accept any permissions required by Microsoft and it will complete
  8. Your powershell will now be back to the command line
  9. Run the command
    echo $token.RefreshToken
  10. Copy the whole token that has been outputted
  11. In the Sync365License site, click on Company and select the “Delegated Admin” tab.
  12. 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.
  13. 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.
  14. We will now be able to get the mailbox counts for your customers and your custom license use.
  15. You can now go and add a custom license to your customers for syncing

Previous Convert Delegated Admin to Secure Application Model
Next Notifications for tenants you have not added
Table of Contents