Namespace: microsoft.graph
Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.
Create a new iosVppEBook 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 |
Delegated (personal Microsoft account) |
Not supported. |
Application |
DeviceManagementApps.ReadWrite.All |
HTTP Request
POST /deviceAppManagement/managedEBooks
Request body
In the request body, supply a JSON representation for the iosVppEBook object.
The following table shows the properties that are required when you create the iosVppEBook.
Property |
Type |
Description |
id |
String |
Key of the entity. Inherited from managedEBook |
displayName |
String |
Name of the eBook. Inherited from managedEBook |
description |
String |
Description. Inherited from managedEBook |
publisher |
String |
Publisher. Inherited from managedEBook |
publishedDateTime |
DateTimeOffset |
The date and time when the eBook was published. Inherited from managedEBook |
largeCover |
mimeContent |
Book cover. Inherited from managedEBook |
createdDateTime |
DateTimeOffset |
The date and time when the eBook file was created. Inherited from managedEBook |
lastModifiedDateTime |
DateTimeOffset |
The date and time when the eBook was last modified. Inherited from managedEBook |
informationUrl |
String |
The more information Url. Inherited from managedEBook |
privacyInformationUrl |
String |
The privacy statement Url. Inherited from managedEBook |
vppTokenId |
Guid |
The Vpp token ID. |
appleId |
String |
The Apple ID associated with Vpp token. |
vppOrganizationName |
String |
The Vpp token's organization name. |
genres |
String collection |
Genres. |
language |
String |
Language. |
seller |
String |
Seller. |
totalLicenseCount |
Int32 |
Total license count. |
usedLicenseCount |
Int32 |
Used license count. |
Response
If successful, this method returns a 201 Created
response code and a iosVppEBook object in the response body.
Example
Request
Here is an example of the request.
POST https://graph.microsoft.com/v1.0/deviceAppManagement/managedEBooks
Content-type: application/json
Content-length: 792
{
"@odata.type": "#microsoft.graph.iosVppEBook",
"displayName": "Display Name value",
"description": "Description value",
"publisher": "Publisher value",
"publishedDateTime": "2016-12-31T23:58:16.1180489-08:00",
"largeCover": {
"@odata.type": "microsoft.graph.mimeContent",
"type": "Type value",
"value": "dmFsdWU="
},
"informationUrl": "https://example.com/informationUrl/",
"privacyInformationUrl": "https://example.com/privacyInformationUrl/",
"vppTokenId": "9148ac60-ac60-9148-60ac-489160ac4891",
"appleId": "Apple Id value",
"vppOrganizationName": "Vpp Organization Name value",
"genres": [
"Genres value"
],
"language": "Language value",
"seller": "Seller value",
"totalLicenseCount": 1,
"usedLicenseCount": 0
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new IosVppEBook
{
OdataType = "#microsoft.graph.iosVppEBook",
DisplayName = "Display Name value",
Description = "Description value",
Publisher = "Publisher value",
PublishedDateTime = DateTimeOffset.Parse("2016-12-31T23:58:16.1180489-08:00"),
LargeCover = new MimeContent
{
OdataType = "microsoft.graph.mimeContent",
Type = "Type value",
Value = Convert.FromBase64String("dmFsdWU="),
},
InformationUrl = "https://example.com/informationUrl/",
PrivacyInformationUrl = "https://example.com/privacyInformationUrl/",
VppTokenId = Guid.Parse("9148ac60-ac60-9148-60ac-489160ac4891"),
AppleId = "Apple Id value",
VppOrganizationName = "Vpp Organization Name value",
Genres = new List<string>
{
"Genres value",
},
Language = "Language value",
Seller = "Seller value",
TotalLicenseCount = 1,
UsedLicenseCount = 0,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceAppManagement.ManagedEBooks.PostAsync(requestBody);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
mgc device-app-management managed-ebooks create --body '{\
"@odata.type": "#microsoft.graph.iosVppEBook",\
"displayName": "Display Name value",\
"description": "Description value",\
"publisher": "Publisher value",\
"publishedDateTime": "2016-12-31T23:58:16.1180489-08:00",\
"largeCover": {\
"@odata.type": "microsoft.graph.mimeContent",\
"type": "Type value",\
"value": "dmFsdWU="\
},\
"informationUrl": "https://example.com/informationUrl/",\
"privacyInformationUrl": "https://example.com/privacyInformationUrl/",\
"vppTokenId": "9148ac60-ac60-9148-60ac-489160ac4891",\
"appleId": "Apple Id value",\
"vppOrganizationName": "Vpp Organization Name value",\
"genres": [\
"Genres value"\
],\
"language": "Language value",\
"seller": "Seller value",\
"totalLicenseCount": 1,\
"usedLicenseCount": 0\
}\
'
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
"time"
"github.com/google/uuid"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewManagedEBook()
displayName := "Display Name value"
requestBody.SetDisplayName(&displayName)
description := "Description value"
requestBody.SetDescription(&description)
publisher := "Publisher value"
requestBody.SetPublisher(&publisher)
publishedDateTime , err := time.Parse(time.RFC3339, "2016-12-31T23:58:16.1180489-08:00")
requestBody.SetPublishedDateTime(&publishedDateTime)
largeCover := graphmodels.NewMimeContent()
type := "Type value"
largeCover.SetType(&type)
value := []byte("dmFsdWU=")
largeCover.SetValue(&value)
requestBody.SetLargeCover(largeCover)
informationUrl := "https://example.com/informationUrl/"
requestBody.SetInformationUrl(&informationUrl)
privacyInformationUrl := "https://example.com/privacyInformationUrl/"
requestBody.SetPrivacyInformationUrl(&privacyInformationUrl)
vppTokenId := uuid.MustParse("9148ac60-ac60-9148-60ac-489160ac4891")
requestBody.SetVppTokenId(&vppTokenId)
appleId := "Apple Id value"
requestBody.SetAppleId(&appleId)
vppOrganizationName := "Vpp Organization Name value"
requestBody.SetVppOrganizationName(&vppOrganizationName)
genres := []string {
"Genres value",
}
requestBody.SetGenres(genres)
language := "Language value"
requestBody.SetLanguage(&language)
seller := "Seller value"
requestBody.SetSeller(&seller)
totalLicenseCount := int32(1)
requestBody.SetTotalLicenseCount(&totalLicenseCount)
usedLicenseCount := int32(0)
requestBody.SetUsedLicenseCount(&usedLicenseCount)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
managedEBooks, err := graphClient.DeviceAppManagement().ManagedEBooks().Post(context.Background(), requestBody, nil)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
IosVppEBook managedEBook = new IosVppEBook();
managedEBook.setOdataType("#microsoft.graph.iosVppEBook");
managedEBook.setDisplayName("Display Name value");
managedEBook.setDescription("Description value");
managedEBook.setPublisher("Publisher value");
OffsetDateTime publishedDateTime = OffsetDateTime.parse("2016-12-31T23:58:16.1180489-08:00");
managedEBook.setPublishedDateTime(publishedDateTime);
MimeContent largeCover = new MimeContent();
largeCover.setOdataType("microsoft.graph.mimeContent");
largeCover.setType("Type value");
byte[] value = Base64.getDecoder().decode("dmFsdWU=");
largeCover.setValue(value);
managedEBook.setLargeCover(largeCover);
managedEBook.setInformationUrl("https://example.com/informationUrl/");
managedEBook.setPrivacyInformationUrl("https://example.com/privacyInformationUrl/");
managedEBook.setVppTokenId(UUID.fromString("9148ac60-ac60-9148-60ac-489160ac4891"));
managedEBook.setAppleId("Apple Id value");
managedEBook.setVppOrganizationName("Vpp Organization Name value");
LinkedList<String> genres = new LinkedList<String>();
genres.add("Genres value");
managedEBook.setGenres(genres);
managedEBook.setLanguage("Language value");
managedEBook.setSeller("Seller value");
managedEBook.setTotalLicenseCount(1);
managedEBook.setUsedLicenseCount(0);
ManagedEBook result = graphClient.deviceAppManagement().managedEBooks().post(managedEBook);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
const options = {
authProvider,
};
const client = Client.init(options);
const managedEBook = {
'@odata.type': '#microsoft.graph.iosVppEBook',
displayName: 'Display Name value',
description: 'Description value',
publisher: 'Publisher value',
publishedDateTime: '2016-12-31T23:58:16.1180489-08:00',
largeCover: {
'@odata.type': 'microsoft.graph.mimeContent',
type: 'Type value',
value: 'dmFsdWU='
},
informationUrl: 'https://example.com/informationUrl/',
privacyInformationUrl: 'https://example.com/privacyInformationUrl/',
vppTokenId: '9148ac60-ac60-9148-60ac-489160ac4891',
appleId: 'Apple Id value',
vppOrganizationName: 'Vpp Organization Name value',
genres: [
'Genres value'
],
language: 'Language value',
seller: 'Seller value',
totalLicenseCount: 1,
usedLicenseCount: 0
};
await client.api('/deviceAppManagement/managedEBooks')
.post(managedEBook);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\IosVppEBook;
use Microsoft\Graph\Generated\Models\MimeContent;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new IosVppEBook();
$requestBody->setOdataType('#microsoft.graph.iosVppEBook');
$requestBody->setDisplayName('Display Name value');
$requestBody->setDescription('Description value');
$requestBody->setPublisher('Publisher value');
$requestBody->setPublishedDateTime(new \DateTime('2016-12-31T23:58:16.1180489-08:00'));
$largeCover = new MimeContent();
$largeCover->setOdataType('microsoft.graph.mimeContent');
$largeCover->setType('Type value');
$largeCover->setValue(\GuzzleHttp\Psr7\Utils::streamFor(base64_decode('dmFsdWU=')));
$requestBody->setLargeCover($largeCover);
$requestBody->setInformationUrl('https://example.com/informationUrl/');
$requestBody->setPrivacyInformationUrl('https://example.com/privacyInformationUrl/');
$requestBody->setVppTokenId('9148ac60-ac60-9148-60ac-489160ac4891');
$requestBody->setAppleId('Apple Id value');
$requestBody->setVppOrganizationName('Vpp Organization Name value');
$requestBody->setGenres(['Genres value', ]);
$requestBody->setLanguage('Language value');
$requestBody->setSeller('Seller value');
$requestBody->setTotalLicenseCount(1);
$requestBody->setUsedLicenseCount(0);
$result = $graphServiceClient->deviceAppManagement()->managedEBooks()->post($requestBody)->wait();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
Import-Module Microsoft.Graph.Devices.CorporateManagement
$params = @{
"@odata.type" = "#microsoft.graph.iosVppEBook"
displayName = "Display Name value"
description = "Description value"
publisher = "Publisher value"
publishedDateTime = [System.DateTime]::Parse("2016-12-31T23:58:16.1180489-08:00")
largeCover = @{
"@odata.type" = "microsoft.graph.mimeContent"
type = "Type value"
value = [System.Text.Encoding]::ASCII.GetBytes("dmFsdWU=")
}
informationUrl = "https://example.com/informationUrl/"
privacyInformationUrl = "https://example.com/privacyInformationUrl/"
vppTokenId = "9148ac60-ac60-9148-60ac-489160ac4891"
appleId = "Apple Id value"
vppOrganizationName = "Vpp Organization Name value"
genres = @(
"Genres value"
)
language = "Language value"
seller = "Seller value"
totalLicenseCount =
usedLicenseCount =
}
New-MgDeviceAppManagementManagedEBook -BodyParameter $params
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.ios_vpp_e_book import IosVppEBook
from msgraph.generated.models.mime_content import MimeContent
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = IosVppEBook(
odata_type = "#microsoft.graph.iosVppEBook",
display_name = "Display Name value",
description = "Description value",
publisher = "Publisher value",
published_date_time = "2016-12-31T23:58:16.1180489-08:00",
large_cover = MimeContent(
odata_type = "microsoft.graph.mimeContent",
type = "Type value",
value = base64.urlsafe_b64decode("dmFsdWU="),
),
information_url = "https://example.com/informationUrl/",
privacy_information_url = "https://example.com/privacyInformationUrl/",
vpp_token_id = UUID("9148ac60-ac60-9148-60ac-489160ac4891"),
apple_id = "Apple Id value",
vpp_organization_name = "Vpp Organization Name value",
genres = [
"Genres value",
],
language = "Language value",
seller = "Seller value",
total_license_count = 1,
used_license_count = 0,
)
result = await graph_client.device_app_management.managed_e_books.post(request_body)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
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: 964
{
"@odata.type": "#microsoft.graph.iosVppEBook",
"id": "3b9f627e-627e-3b9f-7e62-9f3b7e629f3b",
"displayName": "Display Name value",
"description": "Description value",
"publisher": "Publisher value",
"publishedDateTime": "2016-12-31T23:58:16.1180489-08:00",
"largeCover": {
"@odata.type": "microsoft.graph.mimeContent",
"type": "Type value",
"value": "dmFsdWU="
},
"createdDateTime": "2017-01-01T00:02:43.5775965-08:00",
"lastModifiedDateTime": "2017-01-01T00:00:35.1329464-08:00",
"informationUrl": "https://example.com/informationUrl/",
"privacyInformationUrl": "https://example.com/privacyInformationUrl/",
"vppTokenId": "9148ac60-ac60-9148-60ac-489160ac4891",
"appleId": "Apple Id value",
"vppOrganizationName": "Vpp Organization Name value",
"genres": [
"Genres value"
],
"language": "Language value",
"seller": "Seller value",
"totalLicenseCount": 1,
"usedLicenseCount": 0
}