Hardware dashboard API
Use the Microsoft Hardware APIs to programmatically query and create submissions for hardware products within your organization's Partner Center account. These APIs are useful if your account manages many products, and you want to automate and optimize the submission process for these assets. These APIs use Azure Active Directory (Azure AD) to authenticate the calls from your app or service. The following steps describe the end-to-end process of using the Microsoft Hardware API:
These APIs can only be used by accounts that belong to the Hardware Partner Center program.
Make sure that you have completed the prerequisites below.
Before you call a method in the Microsoft Hardware API, obtain an Azure AD access token, as illustrated below. After you obtain a token, you have 60 minutes to use this token in calls to the Microsoft Store submission API before the token expires. After the token expires, you can generate a new token.
Call the Microsoft Hardware API.
Complete the prerequisites for using the Microsoft Hardware API
Before you start writing code to call the Microsoft Hardware API, make sure that you have completed the following required prerequisites.
You (or your organization) must have an Azure AD directory and you must have Global administrator permission for the directory. If you already use Microsoft 365 or other business services from Microsoft, you already have Azure AD directory. Otherwise, you can create a new Azure AD in Partner Center for no additional charge.
If an Azure AD application does not already exist, you must create one.
You must associate an Azure AD application with your Partner Center account and assign it the Manager role.
Gather your Azure AD application tenant ID, client ID, and key. Be sure to print or copy this key info, as you won't be able to access it again after you leave the key creation page.
Assigning the appropriate Hardware roles to your Azure AD application
After you have completed the above prerequisites we must now assign the appropriate roles so that the Azure AD application can create and manage submissions and shipping labels.
From Partner Center, select the gear icon (near the upper right corner of the dashboard) and then select Developer settings. In the Settings menu, select Users.
On the Users page, select Azure AD applications and the Azure AD application that represents the app or service that you will use to access submissions for your Partner Center account.
On this page, under Roles, select Hardware.
Select Driver Submitter, Shipping Label owner, and if available, Shipping Label promoter. Learn more about these roles
Obtain an Azure AD access token
Before you call any of the methods in the Microsoft Hardware API, you must first obtain an Azure AD access token that you pass to the Authorization header of each method in the API. After you obtain an access token, you have 60 minutes to use it before it expires. After the token expires, you can refresh the token, so you can continue to use it in further calls to the API. To obtain the access token, follow the instructions in Service to Service Calls Using Client Credentials to send an HTTP POST to the
https://login.microsoftonline.com/<tenant_id>/oauth2/token endpoint. Here is a sample request.
POST https://login.microsoftonline.com/<tenant_id>/oauth2/token HTTP/1.1 Host: login.microsoftonline.com Content-Type: application/x-www-form-urlencoded; charset=utf-8 grant_type=client_credentials &client_id=<your_client_id> &client_secret=<your_client_secret> &resource=https://manage.devcenter.microsoft.com
For the tenant_id value in the POST URI and the client_id and client_secret parameters, specify the tenant ID, client ID and the key for your application that you retrieved from Partner Center in the previous section. For the resource parameter, you must specify
After your access token expires, you can refresh it by following the instructions in Refreshing the access tokens.
Use the Microsoft Hardware API
After you have an Azure AD access token, you can call methods in the Microsoft Hardware API. The API includes many methods that are grouped into scenarios. To create or update submissions, you typically call multiple methods in the Microsoft Hardware API in a specific order. For information about each scenario and the syntax of each method, see the articles in the following table.
|Drivers||Get, create and update drivers registered to your Partner Center Account. For more information about these methods, see the following articles:|
The following sample provides detailed code that demonstrate how to use the Microsoft Hardware API along with a complete end to end prebuilt solution created by the Microsoft Surface and Devices team:
If you have questions about the Microsoft Store submission API or need assistance managing your submissions with this API, visit the support page and request help.