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 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 Dashboard 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 Dashboard with a global admin account. (This is your primary Partner account.)
From the Settings icon (gear) menu, select Partner settings.
On the Account settings page, select Integration sandbox.
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 Create 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 Dashboard, 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 account and your integration sandbox account.
Enable API access
Sign into Partner Dashboard using a global admin account.
From the Settings icon menu, select Partner settings.
On the Account settings page, select App management.
If you do not already have an existing app, add a new web app. If you have an existing web app, click 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, then sign back in with your integration sandbox account. Repeat steps 2-5 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:
|Item name||Where to find it|
|App ID / Client ID||From the Settings icon menu, select Partner settings. On the Account settings page, select App Management The App ID/Client ID is listed as the Registered application App ID.|
|Key||If you created a web app, this is the key that you saved in Step 5 of "Enable API access".|
|Domain||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 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 account, the rest of your code should work correctly.