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.
Geben Sie im Anforderungstext eine JSON-Darstellung des iosVppApp-Objekts an.
In der folgenden Tabelle sind die Eigenschaften dargestellt, die zum Erstellen der iosVppApp erforderlich sind.
Nachfolgend sehen Sie ein Beispiel der Anforderung.
POST https://graph.microsoft.com/v1.0/deviceAppManagement/mobileApps
Content-type: application/json
Content-length: 1222
{
"@odata.type": "#microsoft.graph.iosVppApp",
"displayName": "Display Name value",
"description": "Description value",
"publisher": "Publisher value",
"largeIcon": {
"@odata.type": "microsoft.graph.mimeContent",
"type": "Type value",
"value": "dmFsdWU="
},
"isFeatured": true,
"privacyInformationUrl": "https://example.com/privacyInformationUrl/",
"informationUrl": "https://example.com/informationUrl/",
"owner": "Owner value",
"developer": "Developer value",
"notes": "Notes value",
"publishingState": "processing",
"usedLicenseCount": 0,
"totalLicenseCount": 1,
"releaseDateTime": "2017-01-01T00:01:34.7470482-08:00",
"appStoreUrl": "https://example.com/appStoreUrl/",
"licensingType": {
"@odata.type": "microsoft.graph.vppLicensingType",
"supportsUserLicensing": true,
"supportsDeviceLicensing": true
},
"applicableDeviceType": {
"@odata.type": "microsoft.graph.iosDeviceType",
"iPad": true,
"iPhoneAndIPod": true
},
"vppTokenOrganizationName": "Vpp Token Organization Name value",
"vppTokenAccountType": "education",
"vppTokenAppleId": "Vpp Token Apple Id value",
"bundleId": "Bundle Id value"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new IosVppApp
{
OdataType = "#microsoft.graph.iosVppApp",
DisplayName = "Display Name value",
Description = "Description value",
Publisher = "Publisher value",
LargeIcon = new MimeContent
{
OdataType = "microsoft.graph.mimeContent",
Type = "Type value",
Value = Convert.FromBase64String("dmFsdWU="),
},
IsFeatured = true,
PrivacyInformationUrl = "https://example.com/privacyInformationUrl/",
InformationUrl = "https://example.com/informationUrl/",
Owner = "Owner value",
Developer = "Developer value",
Notes = "Notes value",
PublishingState = MobileAppPublishingState.Processing,
UsedLicenseCount = 0,
TotalLicenseCount = 1,
ReleaseDateTime = DateTimeOffset.Parse("2017-01-01T00:01:34.7470482-08:00"),
AppStoreUrl = "https://example.com/appStoreUrl/",
LicensingType = new VppLicensingType
{
OdataType = "microsoft.graph.vppLicensingType",
SupportsUserLicensing = true,
SupportsDeviceLicensing = true,
},
ApplicableDeviceType = new IosDeviceType
{
OdataType = "microsoft.graph.iosDeviceType",
IPad = true,
IPhoneAndIPod = true,
},
VppTokenOrganizationName = "Vpp Token Organization Name value",
VppTokenAccountType = VppTokenAccountType.Education,
VppTokenAppleId = "Vpp Token Apple Id value",
BundleId = "Bundle Id 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.MobileApps.PostAsync(requestBody);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
mgc device-app-management mobile-apps create --body '{\
"@odata.type": "#microsoft.graph.iosVppApp",\
"displayName": "Display Name value",\
"description": "Description value",\
"publisher": "Publisher value",\
"largeIcon": {\
"@odata.type": "microsoft.graph.mimeContent",\
"type": "Type value",\
"value": "dmFsdWU="\
},\
"isFeatured": true,\
"privacyInformationUrl": "https://example.com/privacyInformationUrl/",\
"informationUrl": "https://example.com/informationUrl/",\
"owner": "Owner value",\
"developer": "Developer value",\
"notes": "Notes value",\
"publishingState": "processing",\
"usedLicenseCount": 0,\
"totalLicenseCount": 1,\
"releaseDateTime": "2017-01-01T00:01:34.7470482-08:00",\
"appStoreUrl": "https://example.com/appStoreUrl/",\
"licensingType": {\
"@odata.type": "microsoft.graph.vppLicensingType",\
"supportsUserLicensing": true,\
"supportsDeviceLicensing": true\
},\
"applicableDeviceType": {\
"@odata.type": "microsoft.graph.iosDeviceType",\
"iPad": true,\
"iPhoneAndIPod": true\
},\
"vppTokenOrganizationName": "Vpp Token Organization Name value",\
"vppTokenAccountType": "education",\
"vppTokenAppleId": "Vpp Token Apple Id value",\
"bundleId": "Bundle Id value"\
}\
'
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
"time"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewMobileApp()
displayName := "Display Name value"
requestBody.SetDisplayName(&displayName)
description := "Description value"
requestBody.SetDescription(&description)
publisher := "Publisher value"
requestBody.SetPublisher(&publisher)
largeIcon := graphmodels.NewMimeContent()
type := "Type value"
largeIcon.SetType(&type)
value := []byte("dmFsdWU=")
largeIcon.SetValue(&value)
requestBody.SetLargeIcon(largeIcon)
isFeatured := true
requestBody.SetIsFeatured(&isFeatured)
privacyInformationUrl := "https://example.com/privacyInformationUrl/"
requestBody.SetPrivacyInformationUrl(&privacyInformationUrl)
informationUrl := "https://example.com/informationUrl/"
requestBody.SetInformationUrl(&informationUrl)
owner := "Owner value"
requestBody.SetOwner(&owner)
developer := "Developer value"
requestBody.SetDeveloper(&developer)
notes := "Notes value"
requestBody.SetNotes(¬es)
publishingState := graphmodels.PROCESSING_MOBILEAPPPUBLISHINGSTATE
requestBody.SetPublishingState(&publishingState)
usedLicenseCount := int32(0)
requestBody.SetUsedLicenseCount(&usedLicenseCount)
totalLicenseCount := int32(1)
requestBody.SetTotalLicenseCount(&totalLicenseCount)
releaseDateTime , err := time.Parse(time.RFC3339, "2017-01-01T00:01:34.7470482-08:00")
requestBody.SetReleaseDateTime(&releaseDateTime)
appStoreUrl := "https://example.com/appStoreUrl/"
requestBody.SetAppStoreUrl(&appStoreUrl)
licensingType := graphmodels.NewVppLicensingType()
supportsUserLicensing := true
licensingType.SetSupportsUserLicensing(&supportsUserLicensing)
supportsDeviceLicensing := true
licensingType.SetSupportsDeviceLicensing(&supportsDeviceLicensing)
requestBody.SetLicensingType(licensingType)
applicableDeviceType := graphmodels.NewIosDeviceType()
iPad := true
applicableDeviceType.SetIPad(&iPad)
iPhoneAndIPod := true
applicableDeviceType.SetIPhoneAndIPod(&iPhoneAndIPod)
requestBody.SetApplicableDeviceType(applicableDeviceType)
vppTokenOrganizationName := "Vpp Token Organization Name value"
requestBody.SetVppTokenOrganizationName(&vppTokenOrganizationName)
vppTokenAccountType := graphmodels.EDUCATION_VPPTOKENACCOUNTTYPE
requestBody.SetVppTokenAccountType(&vppTokenAccountType)
vppTokenAppleId := "Vpp Token Apple Id value"
requestBody.SetVppTokenAppleId(&vppTokenAppleId)
bundleId := "Bundle Id value"
requestBody.SetBundleId(&bundleId)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
mobileApps, err := graphClient.DeviceAppManagement().MobileApps().Post(context.Background(), requestBody, nil)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
IosVppApp mobileApp = new IosVppApp();
mobileApp.setOdataType("#microsoft.graph.iosVppApp");
mobileApp.setDisplayName("Display Name value");
mobileApp.setDescription("Description value");
mobileApp.setPublisher("Publisher value");
MimeContent largeIcon = new MimeContent();
largeIcon.setOdataType("microsoft.graph.mimeContent");
largeIcon.setType("Type value");
byte[] value = Base64.getDecoder().decode("dmFsdWU=");
largeIcon.setValue(value);
mobileApp.setLargeIcon(largeIcon);
mobileApp.setIsFeatured(true);
mobileApp.setPrivacyInformationUrl("https://example.com/privacyInformationUrl/");
mobileApp.setInformationUrl("https://example.com/informationUrl/");
mobileApp.setOwner("Owner value");
mobileApp.setDeveloper("Developer value");
mobileApp.setNotes("Notes value");
mobileApp.setPublishingState(MobileAppPublishingState.Processing);
mobileApp.setUsedLicenseCount(0);
mobileApp.setTotalLicenseCount(1);
OffsetDateTime releaseDateTime = OffsetDateTime.parse("2017-01-01T00:01:34.7470482-08:00");
mobileApp.setReleaseDateTime(releaseDateTime);
mobileApp.setAppStoreUrl("https://example.com/appStoreUrl/");
VppLicensingType licensingType = new VppLicensingType();
licensingType.setOdataType("microsoft.graph.vppLicensingType");
licensingType.setSupportsUserLicensing(true);
licensingType.setSupportsDeviceLicensing(true);
mobileApp.setLicensingType(licensingType);
IosDeviceType applicableDeviceType = new IosDeviceType();
applicableDeviceType.setOdataType("microsoft.graph.iosDeviceType");
applicableDeviceType.setIPad(true);
applicableDeviceType.setIPhoneAndIPod(true);
mobileApp.setApplicableDeviceType(applicableDeviceType);
mobileApp.setVppTokenOrganizationName("Vpp Token Organization Name value");
mobileApp.setVppTokenAccountType(VppTokenAccountType.Education);
mobileApp.setVppTokenAppleId("Vpp Token Apple Id value");
mobileApp.setBundleId("Bundle Id value");
MobileApp result = graphClient.deviceAppManagement().mobileApps().post(mobileApp);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
const options = {
authProvider,
};
const client = Client.init(options);
const mobileApp = {
'@odata.type': '#microsoft.graph.iosVppApp',
displayName: 'Display Name value',
description: 'Description value',
publisher: 'Publisher value',
largeIcon: {
'@odata.type': 'microsoft.graph.mimeContent',
type: 'Type value',
value: 'dmFsdWU='
},
isFeatured: true,
privacyInformationUrl: 'https://example.com/privacyInformationUrl/',
informationUrl: 'https://example.com/informationUrl/',
owner: 'Owner value',
developer: 'Developer value',
notes: 'Notes value',
publishingState: 'processing',
usedLicenseCount: 0,
totalLicenseCount: 1,
releaseDateTime: '2017-01-01T00:01:34.7470482-08:00',
appStoreUrl: 'https://example.com/appStoreUrl/',
licensingType: {
'@odata.type': 'microsoft.graph.vppLicensingType',
supportsUserLicensing: true,
supportsDeviceLicensing: true
},
applicableDeviceType: {
'@odata.type': 'microsoft.graph.iosDeviceType',
iPad: true,
iPhoneAndIPod: true
},
vppTokenOrganizationName: 'Vpp Token Organization Name value',
vppTokenAccountType: 'education',
vppTokenAppleId: 'Vpp Token Apple Id value',
bundleId: 'Bundle Id value'
};
await client.api('/deviceAppManagement/mobileApps')
.post(mobileApp);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\IosVppApp;
use Microsoft\Graph\Generated\Models\MimeContent;
use Microsoft\Graph\Generated\Models\MobileAppPublishingState;
use Microsoft\Graph\Generated\Models\VppLicensingType;
use Microsoft\Graph\Generated\Models\IosDeviceType;
use Microsoft\Graph\Generated\Models\VppTokenAccountType;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new IosVppApp();
$requestBody->setOdataType('#microsoft.graph.iosVppApp');
$requestBody->setDisplayName('Display Name value');
$requestBody->setDescription('Description value');
$requestBody->setPublisher('Publisher value');
$largeIcon = new MimeContent();
$largeIcon->setOdataType('microsoft.graph.mimeContent');
$largeIcon->setType('Type value');
$largeIcon->setValue(\GuzzleHttp\Psr7\Utils::streamFor(base64_decode('dmFsdWU=')));
$requestBody->setLargeIcon($largeIcon);
$requestBody->setIsFeatured(true);
$requestBody->setPrivacyInformationUrl('https://example.com/privacyInformationUrl/');
$requestBody->setInformationUrl('https://example.com/informationUrl/');
$requestBody->setOwner('Owner value');
$requestBody->setDeveloper('Developer value');
$requestBody->setNotes('Notes value');
$requestBody->setPublishingState(new MobileAppPublishingState('processing'));
$requestBody->setUsedLicenseCount(0);
$requestBody->setTotalLicenseCount(1);
$requestBody->setReleaseDateTime(new \DateTime('2017-01-01T00:01:34.7470482-08:00'));
$requestBody->setAppStoreUrl('https://example.com/appStoreUrl/');
$licensingType = new VppLicensingType();
$licensingType->setOdataType('microsoft.graph.vppLicensingType');
$licensingType->setSupportsUserLicensing(true);
$licensingType->setSupportsDeviceLicensing(true);
$requestBody->setLicensingType($licensingType);
$applicableDeviceType = new IosDeviceType();
$applicableDeviceType->setOdataType('microsoft.graph.iosDeviceType');
$applicableDeviceType->setIPad(true);
$applicableDeviceType->setIPhoneAndIPod(true);
$requestBody->setApplicableDeviceType($applicableDeviceType);
$requestBody->setVppTokenOrganizationName('Vpp Token Organization Name value');
$requestBody->setVppTokenAccountType(new VppTokenAccountType('education'));
$requestBody->setVppTokenAppleId('Vpp Token Apple Id value');
$requestBody->setBundleId('Bundle Id value');
$result = $graphServiceClient->deviceAppManagement()->mobileApps()->post($requestBody)->wait();
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
Import-Module Microsoft.Graph.Devices.CorporateManagement
$params = @{
"@odata.type" = "#microsoft.graph.iosVppApp"
displayName = "Display Name value"
description = "Description value"
publisher = "Publisher value"
largeIcon = @{
"@odata.type" = "microsoft.graph.mimeContent"
type = "Type value"
value = [System.Text.Encoding]::ASCII.GetBytes("dmFsdWU=")
}
isFeatured = $true
privacyInformationUrl = "https://example.com/privacyInformationUrl/"
informationUrl = "https://example.com/informationUrl/"
owner = "Owner value"
developer = "Developer value"
notes = "Notes value"
publishingState = "processing"
usedLicenseCount =
totalLicenseCount =
releaseDateTime = "2017-01-01T00:01:34.7470482-08:00"
appStoreUrl = "https://example.com/appStoreUrl/"
licensingType = @{
"@odata.type" = "microsoft.graph.vppLicensingType"
supportsUserLicensing = $true
supportsDeviceLicensing = $true
}
applicableDeviceType = @{
"@odata.type" = "microsoft.graph.iosDeviceType"
iPad = $true
iPhoneAndIPod = $true
}
vppTokenOrganizationName = "Vpp Token Organization Name value"
vppTokenAccountType = "education"
vppTokenAppleId = "Vpp Token Apple Id value"
bundleId = "Bundle Id value"
}
New-MgDeviceAppManagementMobileApp -BodyParameter $params
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.ios_vpp_app import IosVppApp
from msgraph.generated.models.mime_content import MimeContent
from msgraph.generated.models.mobile_app_publishing_state import MobileAppPublishingState
from msgraph.generated.models.vpp_licensing_type import VppLicensingType
from msgraph.generated.models.ios_device_type import IosDeviceType
from msgraph.generated.models.vpp_token_account_type import VppTokenAccountType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = IosVppApp(
odata_type = "#microsoft.graph.iosVppApp",
display_name = "Display Name value",
description = "Description value",
publisher = "Publisher value",
large_icon = MimeContent(
odata_type = "microsoft.graph.mimeContent",
type = "Type value",
value = base64.urlsafe_b64decode("dmFsdWU="),
),
is_featured = True,
privacy_information_url = "https://example.com/privacyInformationUrl/",
information_url = "https://example.com/informationUrl/",
owner = "Owner value",
developer = "Developer value",
notes = "Notes value",
publishing_state = MobileAppPublishingState.Processing,
used_license_count = 0,
total_license_count = 1,
release_date_time = "2017-01-01T00:01:34.7470482-08:00",
app_store_url = "https://example.com/appStoreUrl/",
licensing_type = VppLicensingType(
odata_type = "microsoft.graph.vppLicensingType",
supports_user_licensing = True,
supports_device_licensing = True,
),
applicable_device_type = IosDeviceType(
odata_type = "microsoft.graph.iosDeviceType",
i_pad = True,
i_phone_and_i_pod = True,
),
vpp_token_organization_name = "Vpp Token Organization Name value",
vpp_token_account_type = VppTokenAccountType.Education,
vpp_token_apple_id = "Vpp Token Apple Id value",
bundle_id = "Bundle Id value",
)
result = await graph_client.device_app_management.mobile_apps.post(request_body)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
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.