Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Namespace: microsoft.graph
Important: Microsoft supports Intune /beta APIs, but they are subject to more frequent change. Microsoft recommends using version v1.0 when possible. Check an API's availability in version v1.0 using the Version selector.
Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.
Create a new vppToken object.
This API is available in the following national cloud deployments.
| Global service | US Government L4 | US Government L5 (DOD) | China operated by 21Vianet |
|---|---|---|---|
| ✅ | ✅ | ✅ | ✅ |
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
| Permission type | Permissions (from least to most privileged) |
|---|---|
| Delegated (work or school account) | DeviceManagementApps.ReadWrite.All, DeviceManagementServiceConfig.ReadWrite.All |
| Delegated (personal Microsoft account) | Not supported. |
| Application | DeviceManagementApps.ReadWrite.All, DeviceManagementServiceConfig.ReadWrite.All |
HTTP Request
POST /deviceAppManagement/vppTokens
Request headers
| Header | Value |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Accept | application/json |
Request body
In the request body, supply a JSON representation for the vppToken object.
The following table shows the properties that are required when you create the vppToken.
| Property | Type | Description |
|---|---|---|
| id | String | This is automatically generated when the appleVolumePurchaseProgramToken is created. It is the Key of the entity. |
| organizationName | String | The organization associated with the Apple Volume Purchase Program Token |
| vppTokenAccountType | vppTokenAccountType | The type of volume purchase program which the given Apple Volume Purchase Program Token is associated with. Possible values are: business, education. Possible values are: business, education. |
| appleId | String | The apple Id associated with the given Apple Volume Purchase Program Token. |
| expirationDateTime | DateTimeOffset | The expiration date time of the Apple Volume Purchase Program Token. |
| lastSyncDateTime | DateTimeOffset | The last time when an application sync was done with the Apple volume purchase program service using the the Apple Volume Purchase Program Token. |
| token | String | The Apple Volume Purchase Program Token string downloaded from the Apple Volume Purchase Program. |
| lastModifiedDateTime | DateTimeOffset | Last modification date time associated with the Apple Volume Purchase Program Token. |
| state | vppTokenState | Current state of the Apple Volume Purchase Program Token. Possible values are: unknown, valid, expired, invalid, assignedToExternalMDM. Possible values are: unknown, valid, expired, invalid, assignedToExternalMDM, duplicateLocationId. |
| tokenActionResults | vppTokenActionResult collection | The collection of statuses of the actions performed on the Apple Volume Purchase Program Token. |
| lastSyncStatus | vppTokenSyncStatus | Current sync status of the last application sync which was triggered using the Apple Volume Purchase Program Token. Possible values are: none, inProgress, completed, failed. Possible values are: none, inProgress, completed, failed. |
| automaticallyUpdateApps | Boolean | Whether or not apps for the VPP token will be automatically updated. |
| countryOrRegion | String | Whether or not apps for the VPP token will be automatically updated. |
| dataSharingConsentGranted | Boolean | Consent granted for data sharing with the Apple Volume Purchase Program. |
| displayName | String | An admin specified token friendly name. |
| locationName | String | Token location returned from Apple VPP. |
| claimTokenManagementFromExternalMdm | Boolean | Admin consent to allow claiming token management from external MDM. |
| roleScopeTagIds | String collection | Role Scope Tags IDs assigned to this entity. |
| lastAppCount | Int32 | The number of apps under the Apple Volume Purchase Program Token since the last token sync. |
Response
If successful, this method returns a 201 Created response code and a vppToken object in the response body.
Example
Request
Here is an example of the request.
POST https://graph.microsoft.com/beta/deviceAppManagement/vppTokens
Content-type: application/json
Content-length: 1025
{
"@odata.type": "#microsoft.graph.vppToken",
"organizationName": "Organization Name value",
"vppTokenAccountType": "education",
"appleId": "Apple Id value",
"expirationDateTime": "2016-12-31T23:57:57.2481234-08:00",
"lastSyncDateTime": "2017-01-01T00:02:49.3205976-08:00",
"token": "Token value",
"state": "valid",
"tokenActionResults": [
{
"@odata.type": "microsoft.graph.vppTokenActionResult",
"actionName": "Action Name value",
"actionState": "pending",
"startDateTime": "2016-12-31T23:58:46.7156189-08:00",
"lastUpdatedDateTime": "2017-01-01T00:00:56.8321556-08:00"
}
],
"lastSyncStatus": "inProgress",
"automaticallyUpdateApps": true,
"countryOrRegion": "Country Or Region value",
"dataSharingConsentGranted": true,
"displayName": "Display Name value",
"locationName": "Location Name value",
"claimTokenManagementFromExternalMdm": true,
"roleScopeTagIds": [
"Role Scope Tag Ids value"
],
"lastAppCount": 12
}
Response
Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1138
{
"@odata.type": "#microsoft.graph.vppToken",
"id": "9ceb2f92-2f92-9ceb-922f-eb9c922feb9c",
"organizationName": "Organization Name value",
"vppTokenAccountType": "education",
"appleId": "Apple Id value",
"expirationDateTime": "2016-12-31T23:57:57.2481234-08:00",
"lastSyncDateTime": "2017-01-01T00:02:49.3205976-08:00",
"token": "Token value",
"lastModifiedDateTime": "2017-01-01T00:00:35.1329464-08:00",
"state": "valid",
"tokenActionResults": [
{
"@odata.type": "microsoft.graph.vppTokenActionResult",
"actionName": "Action Name value",
"actionState": "pending",
"startDateTime": "2016-12-31T23:58:46.7156189-08:00",
"lastUpdatedDateTime": "2017-01-01T00:00:56.8321556-08:00"
}
],
"lastSyncStatus": "inProgress",
"automaticallyUpdateApps": true,
"countryOrRegion": "Country Or Region value",
"dataSharingConsentGranted": true,
"displayName": "Display Name value",
"locationName": "Location Name value",
"claimTokenManagementFromExternalMdm": true,
"roleScopeTagIds": [
"Role Scope Tag Ids value"
],
"lastAppCount": 12
}