Set up API access in Partner Center
Applies to: Partner Center | Partner Center operated by 21Vianet | Partner Center for Microsoft Cloud for US Government
This article describes the accounts you need to develop against the Partner Center SDK. This article also explains how to create an integration sandbox account and test in the integration sandbox.
Note
To get access to APIs, your tenant must be a Cloud Solution Provider (CSP tenant, and you must be either an Indirect Provider or a direct-bill partner.
Account definitions
To help you integrate and test your API integration, Partner Center supports two kinds of accounts:
Primary partner account
This account is where you create real orders for real customers. If you make any changes or transactions when you're signed in to the primary account, by using either the Partner Center SDK or the Partner Dashboard UI, they'll be treated as official orders for real customers. They'll be reflected in your invoice, and your company is responsible for paying for them.
Integration sandbox account
This account is for testing your code and its integration with the Partner Center APIs before you deploy it broadly. Changes and transactions you make when you are signed in to the integration sandbox account appear in your invoice, but you don't have to pay the invoice amount. The invoice pdf contains a disclaimer: "DO NOT PAY. THIS IS A SANDBOX INVOICE AND NO ACTION IS REQUIRED."
- The integration sandbox account and the primary account act independently. They don't share admin accounts, user accounts, customers, orders, subscriptions, or other data.
- The integration sandbox supports transactions with a limited number of customers, orders, subscriptions, licenses, and so on.
- By policy, integration sandbox accounts are for integration testing purposes only.
- By default, there is no integration sandbox account. You must create one yourself if you plan to use the Partner Center SDK.
Set up your accounts
This section describes how to set up a primary partner account and an integration sandbox account for the Partner Center SDK.
Create an integration sandbox
Sign in to Partner Center with a global admin account, then select Settings (gear icon).
Note
Creating a sandbox requires that the partner global admin be logged in to Partner Center with their
onmicrosoft.com
domain alias (for example,alias@domain.onmicrosoft.com
). Sandbox creation fails if the user is logged in with their custom domain.Select Account settings, then Integration sandbox.
Note
If you don't see an integration sandbox option, you might not have a global admin account. It's also possible that you're already using an integration sandbox account that was previously set up.
Create your Reseller Sandbox:
- Create a new Entra tenant to use as a sandbox tenant by opening a support ticket.
- Provide all of the required information on the Integration sandbox page, then select Associate tenant at the bottom of the page.
- Sign in with the global admin credentials of the new tenant created in step a.
After sign in is successful, a Reseller Sandbox account is created. This account doesn't get vetted - it's activated as soon as account enrollment is complete. Make note of the sandbox domain for reference.
Sign back in with your new integration sandbox admin account. Use the format
username@domain
for your credentials, along with the password that you specified.Choose Set up account on the Integration sandbox page to complete the sandbox account setup.
Enable API access
After your account is set up, you must enable API access before you can use the Partner Center SDK with the integration sandbox. You need to enable access to the API separately for both your primary partner account and your integration sandbox account.
- Sign in to Partner Center with a global admin account, then select Settings (gear icon).
- Select Account settings, then App management.
- If you don't already have an existing app, add a new web app. If you have an existing web app, choose the Add key button.
- Copy the app registration information, especially the Key if you're creating a web app, and store it in a safe place.
- Sign out of Partner Dashboard.
- Sign back in with your integration sandbox account. Repeat steps 2-5 to enable API access in the integration sandbox.
Write and test code
You can write code and test code in the integration sandbox. You need the following information to set up Partner Center authentication with a Microsoft Entra ID.
- App ID / Client ID: Listed as the Registered application App ID within Settings (gear icon) > Account settings > App management
- Key: If you created a new web app in the previous section, use that key
- Domain: For the integration sandbox
Run tested code
To use your solution with real customer data, you must change from your integration sandbox credentials to your primary Partner account credentials.
When you're ready to use your tested code in your primary partner account, you need a Microsoft Entra security token. This security token is based on your Partner Center app, key, and domain (instead of your integration sandbox app, key, and domain).
- Follow the steps in Partner Center authentication to get a Microsoft Entra security token using your primary Partner Center credentials. (You previously followed these steps to get a Microsoft Entra security token for your integration sandbox.)
- Replace the integration security token in your code with the new security token for your primary partner account.