Eine der nachfolgenden Berechtigungen ist erforderlich, um diese API aufrufen zu können. Weitere Informationen, unter anderem zur Auswahl von Berechtigungen, finden Sie unter Berechtigungen.
Berechtigungstyp
Berechtigungen (von der Berechtigung mit den wenigsten Rechten zu der mit den meisten Rechten)
Volume Purchase Program-Typ, dem das angegebene Apple Volume Purchase Program-Token zugeordnet ist. Mögliche Werte sind: business und education. Mögliche Werte sind: business und education.
appleId
String
Die Apple-ID, die dem Apple Volume Purchase Program-Token zugeordnet ist.
expirationDateTime
DateTimeOffset
Ablaufdatum und -Uhrzeit des Apple Volume Purchase Program-Tokens
lastSyncDateTime
DateTimeOffset
Der Zeitpunkt der letzten Anwendungssynchronisierung mit dem Apple Volume Purchase Program-Dienst mithilfe des Apple Volume Purchase Program-Tokens.
token
String
Die Zeichenfolge des Apple Volume Purchase Program-Tokens, die vom Apple Volume Purchase Program heruntergeladen wurde.
lastModifiedDateTime
DateTimeOffset
Datum und Uhrzeit der letzten Änderung, die dem Apple Volume Purchase Program-Token zugeordnet sind.
Aktueller Synchronisierungsstatus der letzten Anwendungssynchronisierung, die mit dem Apple Volume Purchase Program-Token ausgelöst wurde. Mögliche Werte sind: none, inProgress, completed und failed. Mögliche Werte sind: none, inProgress, completed und failed.
automaticallyUpdateApps
Boolean
Gibt an, ob Apps für das VPP-Token automatisch aktualisiert werden.
countryOrRegion
String
Gibt an, ob Apps für das VPP-Token automatisch aktualisiert werden.
Antwort
Bei erfolgreicher Ausführung gibt die Methode den Antwortcode 200 OK und ein aktualisiertes Objekt des Typs vppToken im Antworttext zurück.
Beispiel
Anforderung
Nachfolgend sehen Sie ein Beispiel der Anforderung.
PATCH https://graph.microsoft.com/v1.0/deviceAppManagement/vppTokens/{vppTokenId}
Content-type: application/json
Content-length: 461
{
"@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",
"lastSyncStatus": "inProgress",
"automaticallyUpdateApps": true,
"countryOrRegion": "Country Or Region value"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new VppToken
{
OdataType = "#microsoft.graph.vppToken",
OrganizationName = "Organization Name value",
VppTokenAccountType = VppTokenAccountType.Education,
AppleId = "Apple Id value",
ExpirationDateTime = DateTimeOffset.Parse("2016-12-31T23:57:57.2481234-08:00"),
LastSyncDateTime = DateTimeOffset.Parse("2017-01-01T00:02:49.3205976-08:00"),
Token = "Token value",
State = VppTokenState.Valid,
LastSyncStatus = VppTokenSyncStatus.InProgress,
AutomaticallyUpdateApps = true,
CountryOrRegion = "Country Or Region value",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceAppManagement.VppTokens["{vppToken-id}"].PatchAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
VppToken vppToken = new VppToken();
vppToken.setOdataType("#microsoft.graph.vppToken");
vppToken.setOrganizationName("Organization Name value");
vppToken.setVppTokenAccountType(VppTokenAccountType.Education);
vppToken.setAppleId("Apple Id value");
OffsetDateTime expirationDateTime = OffsetDateTime.parse("2016-12-31T23:57:57.2481234-08:00");
vppToken.setExpirationDateTime(expirationDateTime);
OffsetDateTime lastSyncDateTime = OffsetDateTime.parse("2017-01-01T00:02:49.3205976-08:00");
vppToken.setLastSyncDateTime(lastSyncDateTime);
vppToken.setToken("Token value");
vppToken.setState(VppTokenState.Valid);
vppToken.setLastSyncStatus(VppTokenSyncStatus.InProgress);
vppToken.setAutomaticallyUpdateApps(true);
vppToken.setCountryOrRegion("Country Or Region value");
VppToken result = graphClient.deviceAppManagement().vppTokens().byVppTokenId("{vppToken-id}").patch(vppToken);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\VppToken;
use Microsoft\Graph\Generated\Models\VppTokenAccountType;
use Microsoft\Graph\Generated\Models\VppTokenState;
use Microsoft\Graph\Generated\Models\VppTokenSyncStatus;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new VppToken();
$requestBody->setOdataType('#microsoft.graph.vppToken');
$requestBody->setOrganizationName('Organization Name value');
$requestBody->setVppTokenAccountType(new VppTokenAccountType('education'));
$requestBody->setAppleId('Apple Id value');
$requestBody->setExpirationDateTime(new \DateTime('2016-12-31T23:57:57.2481234-08:00'));
$requestBody->setLastSyncDateTime(new \DateTime('2017-01-01T00:02:49.3205976-08:00'));
$requestBody->setToken('Token value');
$requestBody->setState(new VppTokenState('valid'));
$requestBody->setLastSyncStatus(new VppTokenSyncStatus('inProgress'));
$requestBody->setAutomaticallyUpdateApps(true);
$requestBody->setCountryOrRegion('Country Or Region value');
$result = $graphServiceClient->deviceAppManagement()->vppTokens()->byVppTokenId('vppToken-id')->patch($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.vpp_token import VppToken
from msgraph.generated.models.vpp_token_account_type import VppTokenAccountType
from msgraph.generated.models.vpp_token_state import VppTokenState
from msgraph.generated.models.vpp_token_sync_status import VppTokenSyncStatus
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = VppToken(
odata_type = "#microsoft.graph.vppToken",
organization_name = "Organization Name value",
vpp_token_account_type = VppTokenAccountType.Education,
apple_id = "Apple Id value",
expiration_date_time = "2016-12-31T23:57:57.2481234-08:00",
last_sync_date_time = "2017-01-01T00:02:49.3205976-08:00",
token = "Token value",
state = VppTokenState.Valid,
last_sync_status = VppTokenSyncStatus.InProgress,
automatically_update_apps = True,
country_or_region = "Country Or Region value",
)
result = await graph_client.device_app_management.vpp_tokens.by_vpp_token_id('vppToken-id').patch(request_body)
Nachfolgend sehen Sie ein Beispiel der Antwort. Hinweis: Das hier gezeigte Antwortobjekt ist möglicherweise aus Platzgründen abgeschnitten. Von einem tatsächlichen Aufruf werden alle Eigenschaften zurückgegeben.
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 574
{
"@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",
"lastSyncStatus": "inProgress",
"automaticallyUpdateApps": true,
"countryOrRegion": "Country Or Region value"
}