Set up API access in Partner Center
- Partner Center
- Partner Center operated by 21Vianet
- Partner Center for Microsoft Cloud for US Government
- Partner Center for Microsoft Cloud Germany
This topic describes the accounts you need to develop against the Partner Center SDK, how to create an integration sandbox account, and how to test in the integration sandbox.
To help you integrate and test your API integration, Partner Center supports two kinds of accounts:
|Primary Partner Center account||
This account is where you create real orders for real customers. If you make any changes or transactions when you are signed in to the primary account, by using either the Partner Center SDK or the Partner Center UI, they will be treated as official orders for real customers. They will 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 into the integration sandbox account will not appear in your invoice.
Set up your accounts
Create an integration sandbox
- Sign in into Partner Center with a global admin account. (This is your primary Partner Center account.)
From the Dashboard menu, select Account settings, then Integration sandbox.
Note If you don't see an Integration sandbox option, you might not have a global admin account, or the integration sandbox has already been set up and you're using an integration sandbox account.
Fill in the contact information for the integration sandbox admin account, and then click Set up account. You might need to wait a few minutes for the account to be created.
After you see the confirmation message, sign out of Partner Center, then sign back in with your new integration sandbox admin account, in the form username@domain and with the password you just specified.
After you sign back in with your new integration sandbox admin account, above Current Tasks, click Set Up Account to complete the sandbox account setup.
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 Center account and your integration sandbox account.
Enable API access
Sign into Partner Center using a global admin account.
From the Dashboard menu, select Account settings, then App management.
Select an existing app or create a new app with default settings. Existing apps show up only if the Azure AD account has existing apps.
On the confirmation page, 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 Center, then sign back in with your integration sandbox account. Repeat steps 2-4 to enable API access in the integration sandbox.
Write and test code in the integration sandbox
To write code and test code in Partner Center, you'll need to set up authentication with Azure AD, as described in Partner Center authentication. You'll need the following pieces of information:
Where to find it
App ID / Client ID
From the Dashboard menu, select Account settings, then App Management The App ID/Client ID is listed as the Registered application App ID.
If you created a web app, this is the key that you saved in Step 4 of "Enable API access".
This is the domain for the integration sandbox.
Use your solution for real customer data
Change credentials from integration sandbox to primary account
When you are ready to use your tested code in your primary Partner Center account, you must get an Azure AD security token based on your Partner Center app/key/domain instead of the integration sandbox app/key/domain.
Repeat the same steps for Partner Center authentication that you used to get an Azure AD security token in the integration sandbox, but use your primary Partner Center credentials instead.
After you replace the integration security token with the one for your primary Partner Center account, the rest of your code should work correctly.