PATCH https://graph.microsoft.com/v1.0/deviceAppManagement/mobileApps/{mobileAppId}
Content-type: application/json
Content-length: 2134
{
"@odata.type": "#microsoft.graph.win32LobApp",
"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",
"committedContentVersion": "Committed Content Version value",
"fileName": "File Name value",
"size": 4,
"installCommandLine": "Install Command Line value",
"uninstallCommandLine": "Uninstall Command Line value",
"applicableArchitectures": "x86",
"minimumFreeDiskSpaceInMB": 8,
"minimumMemoryInMB": 1,
"minimumNumberOfProcessors": 9,
"minimumCpuSpeedInMHz": 4,
"rules": [
{
"@odata.type": "microsoft.graph.win32LobAppRegistryRule",
"ruleType": "requirement",
"check32BitOn64System": true,
"keyPath": "Key Path value",
"valueName": "Value Name value",
"operationType": "exists",
"operator": "equal",
"comparisonValue": "Comparison Value value"
}
],
"installExperience": {
"@odata.type": "microsoft.graph.win32LobAppInstallExperience",
"runAsAccount": "user",
"deviceRestartBehavior": "allow"
},
"returnCodes": [
{
"@odata.type": "microsoft.graph.win32LobAppReturnCode",
"returnCode": 10,
"type": "success"
}
],
"msiInformation": {
"@odata.type": "microsoft.graph.win32LobAppMsiInformation",
"productCode": "Product Code value",
"productVersion": "Product Version value",
"upgradeCode": "Upgrade Code value",
"requiresReboot": true,
"packageType": "perUser",
"productName": "Product Name value",
"publisher": "Publisher value"
},
"setupFilePath": "Setup File Path value",
"minimumSupportedWindowsRelease": "Minimum Supported Windows Release value"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new Win32LobApp
{
OdataType = "#microsoft.graph.win32LobApp",
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,
CommittedContentVersion = "Committed Content Version value",
FileName = "File Name value",
Size = 4L,
InstallCommandLine = "Install Command Line value",
UninstallCommandLine = "Uninstall Command Line value",
ApplicableArchitectures = WindowsArchitecture.X86,
MinimumFreeDiskSpaceInMB = 8,
MinimumMemoryInMB = 1,
MinimumNumberOfProcessors = 9,
MinimumCpuSpeedInMHz = 4,
Rules = new List<Win32LobAppRule>
{
new Win32LobAppRegistryRule
{
OdataType = "microsoft.graph.win32LobAppRegistryRule",
RuleType = Win32LobAppRuleType.Requirement,
Check32BitOn64System = true,
KeyPath = "Key Path value",
ValueName = "Value Name value",
OperationType = Win32LobAppRegistryRuleOperationType.Exists,
Operator = Win32LobAppRuleOperator.Equal,
ComparisonValue = "Comparison Value value",
},
},
InstallExperience = new Win32LobAppInstallExperience
{
OdataType = "microsoft.graph.win32LobAppInstallExperience",
RunAsAccount = RunAsAccountType.User,
DeviceRestartBehavior = Win32LobAppRestartBehavior.Allow,
},
ReturnCodes = new List<Win32LobAppReturnCode>
{
new Win32LobAppReturnCode
{
OdataType = "microsoft.graph.win32LobAppReturnCode",
ReturnCode = 10,
Type = Win32LobAppReturnCodeType.Success,
},
},
MsiInformation = new Win32LobAppMsiInformation
{
OdataType = "microsoft.graph.win32LobAppMsiInformation",
ProductCode = "Product Code value",
ProductVersion = "Product Version value",
UpgradeCode = "Upgrade Code value",
RequiresReboot = true,
PackageType = Win32LobAppMsiPackageType.PerUser,
ProductName = "Product Name value",
Publisher = "Publisher value",
},
SetupFilePath = "Setup File Path value",
MinimumSupportedWindowsRelease = "Minimum Supported Windows Release 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["{mobileApp-id}"].PatchAsync(requestBody);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
mgc device-app-management mobile-apps patch --mobile-app-id {mobileApp-id} --body '{\
"@odata.type": "#microsoft.graph.win32LobApp",\
"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",\
"committedContentVersion": "Committed Content Version value",\
"fileName": "File Name value",\
"size": 4,\
"installCommandLine": "Install Command Line value",\
"uninstallCommandLine": "Uninstall Command Line value",\
"applicableArchitectures": "x86",\
"minimumFreeDiskSpaceInMB": 8,\
"minimumMemoryInMB": 1,\
"minimumNumberOfProcessors": 9,\
"minimumCpuSpeedInMHz": 4,\
"rules": [\
{\
"@odata.type": "microsoft.graph.win32LobAppRegistryRule",\
"ruleType": "requirement",\
"check32BitOn64System": true,\
"keyPath": "Key Path value",\
"valueName": "Value Name value",\
"operationType": "exists",\
"operator": "equal",\
"comparisonValue": "Comparison Value value"\
}\
],\
"installExperience": {\
"@odata.type": "microsoft.graph.win32LobAppInstallExperience",\
"runAsAccount": "user",\
"deviceRestartBehavior": "allow"\
},\
"returnCodes": [\
{\
"@odata.type": "microsoft.graph.win32LobAppReturnCode",\
"returnCode": 10,\
"type": "success"\
}\
],\
"msiInformation": {\
"@odata.type": "microsoft.graph.win32LobAppMsiInformation",\
"productCode": "Product Code value",\
"productVersion": "Product Version value",\
"upgradeCode": "Upgrade Code value",\
"requiresReboot": true,\
"packageType": "perUser",\
"productName": "Product Name value",\
"publisher": "Publisher value"\
},\
"setupFilePath": "Setup File Path value",\
"minimumSupportedWindowsRelease": "Minimum Supported Windows Release value"\
}\
'
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
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)
committedContentVersion := "Committed Content Version value"
requestBody.SetCommittedContentVersion(&committedContentVersion)
fileName := "File Name value"
requestBody.SetFileName(&fileName)
size := int64(4)
requestBody.SetSize(&size)
installCommandLine := "Install Command Line value"
requestBody.SetInstallCommandLine(&installCommandLine)
uninstallCommandLine := "Uninstall Command Line value"
requestBody.SetUninstallCommandLine(&uninstallCommandLine)
applicableArchitectures := graphmodels.X86_WINDOWSARCHITECTURE
requestBody.SetApplicableArchitectures(&applicableArchitectures)
minimumFreeDiskSpaceInMB := int32(8)
requestBody.SetMinimumFreeDiskSpaceInMB(&minimumFreeDiskSpaceInMB)
minimumMemoryInMB := int32(1)
requestBody.SetMinimumMemoryInMB(&minimumMemoryInMB)
minimumNumberOfProcessors := int32(9)
requestBody.SetMinimumNumberOfProcessors(&minimumNumberOfProcessors)
minimumCpuSpeedInMHz := int32(4)
requestBody.SetMinimumCpuSpeedInMHz(&minimumCpuSpeedInMHz)
win32LobAppRule := graphmodels.NewWin32LobAppRegistryRule()
ruleType := graphmodels.REQUIREMENT_WIN32LOBAPPRULETYPE
win32LobAppRule.SetRuleType(&ruleType)
check32BitOn64System := true
win32LobAppRule.SetCheck32BitOn64System(&check32BitOn64System)
keyPath := "Key Path value"
win32LobAppRule.SetKeyPath(&keyPath)
valueName := "Value Name value"
win32LobAppRule.SetValueName(&valueName)
operationType := graphmodels.EXISTS_WIN32LOBAPPREGISTRYRULEOPERATIONTYPE
win32LobAppRule.SetOperationType(&operationType)
operator := graphmodels.EQUAL_WIN32LOBAPPRULEOPERATOR
win32LobAppRule.SetOperator(&operator)
comparisonValue := "Comparison Value value"
win32LobAppRule.SetComparisonValue(&comparisonValue)
rules := []graphmodels.Win32LobAppRuleable {
win32LobAppRule,
}
requestBody.SetRules(rules)
installExperience := graphmodels.NewWin32LobAppInstallExperience()
runAsAccount := graphmodels.USER_RUNASACCOUNTTYPE
installExperience.SetRunAsAccount(&runAsAccount)
deviceRestartBehavior := graphmodels.ALLOW_WIN32LOBAPPRESTARTBEHAVIOR
installExperience.SetDeviceRestartBehavior(&deviceRestartBehavior)
requestBody.SetInstallExperience(installExperience)
win32LobAppReturnCode := graphmodels.NewWin32LobAppReturnCode()
returnCode := int32(10)
win32LobAppReturnCode.SetReturnCode(&returnCode)
type := graphmodels.SUCCESS_WIN32LOBAPPRETURNCODETYPE
win32LobAppReturnCode.SetType(&type)
returnCodes := []graphmodels.Win32LobAppReturnCodeable {
win32LobAppReturnCode,
}
requestBody.SetReturnCodes(returnCodes)
msiInformation := graphmodels.NewWin32LobAppMsiInformation()
productCode := "Product Code value"
msiInformation.SetProductCode(&productCode)
productVersion := "Product Version value"
msiInformation.SetProductVersion(&productVersion)
upgradeCode := "Upgrade Code value"
msiInformation.SetUpgradeCode(&upgradeCode)
requiresReboot := true
msiInformation.SetRequiresReboot(&requiresReboot)
packageType := graphmodels.PERUSER_WIN32LOBAPPMSIPACKAGETYPE
msiInformation.SetPackageType(&packageType)
productName := "Product Name value"
msiInformation.SetProductName(&productName)
publisher := "Publisher value"
msiInformation.SetPublisher(&publisher)
requestBody.SetMsiInformation(msiInformation)
setupFilePath := "Setup File Path value"
requestBody.SetSetupFilePath(&setupFilePath)
minimumSupportedWindowsRelease := "Minimum Supported Windows Release value"
requestBody.SetMinimumSupportedWindowsRelease(&minimumSupportedWindowsRelease)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
mobileApps, err := graphClient.DeviceAppManagement().MobileApps().ByMobileAppId("mobileApp-id").Patch(context.Background(), requestBody, nil)
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
Win32LobApp mobileApp = new Win32LobApp();
mobileApp.setOdataType("#microsoft.graph.win32LobApp");
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.setCommittedContentVersion("Committed Content Version value");
mobileApp.setFileName("File Name value");
mobileApp.setSize(4L);
mobileApp.setInstallCommandLine("Install Command Line value");
mobileApp.setUninstallCommandLine("Uninstall Command Line value");
mobileApp.setApplicableArchitectures(EnumSet.of(WindowsArchitecture.X86));
mobileApp.setMinimumFreeDiskSpaceInMB(8);
mobileApp.setMinimumMemoryInMB(1);
mobileApp.setMinimumNumberOfProcessors(9);
mobileApp.setMinimumCpuSpeedInMHz(4);
LinkedList<Win32LobAppRule> rules = new LinkedList<Win32LobAppRule>();
Win32LobAppRegistryRule win32LobAppRule = new Win32LobAppRegistryRule();
win32LobAppRule.setOdataType("microsoft.graph.win32LobAppRegistryRule");
win32LobAppRule.setRuleType(Win32LobAppRuleType.Requirement);
win32LobAppRule.setCheck32BitOn64System(true);
win32LobAppRule.setKeyPath("Key Path value");
win32LobAppRule.setValueName("Value Name value");
win32LobAppRule.setOperationType(Win32LobAppRegistryRuleOperationType.Exists);
win32LobAppRule.setOperator(Win32LobAppRuleOperator.Equal);
win32LobAppRule.setComparisonValue("Comparison Value value");
rules.add(win32LobAppRule);
mobileApp.setRules(rules);
Win32LobAppInstallExperience installExperience = new Win32LobAppInstallExperience();
installExperience.setOdataType("microsoft.graph.win32LobAppInstallExperience");
installExperience.setRunAsAccount(RunAsAccountType.User);
installExperience.setDeviceRestartBehavior(Win32LobAppRestartBehavior.Allow);
mobileApp.setInstallExperience(installExperience);
LinkedList<Win32LobAppReturnCode> returnCodes = new LinkedList<Win32LobAppReturnCode>();
Win32LobAppReturnCode win32LobAppReturnCode = new Win32LobAppReturnCode();
win32LobAppReturnCode.setOdataType("microsoft.graph.win32LobAppReturnCode");
win32LobAppReturnCode.setReturnCode(10);
win32LobAppReturnCode.setType(Win32LobAppReturnCodeType.Success);
returnCodes.add(win32LobAppReturnCode);
mobileApp.setReturnCodes(returnCodes);
Win32LobAppMsiInformation msiInformation = new Win32LobAppMsiInformation();
msiInformation.setOdataType("microsoft.graph.win32LobAppMsiInformation");
msiInformation.setProductCode("Product Code value");
msiInformation.setProductVersion("Product Version value");
msiInformation.setUpgradeCode("Upgrade Code value");
msiInformation.setRequiresReboot(true);
msiInformation.setPackageType(Win32LobAppMsiPackageType.PerUser);
msiInformation.setProductName("Product Name value");
msiInformation.setPublisher("Publisher value");
mobileApp.setMsiInformation(msiInformation);
mobileApp.setSetupFilePath("Setup File Path value");
mobileApp.setMinimumSupportedWindowsRelease("Minimum Supported Windows Release value");
MobileApp result = graphClient.deviceAppManagement().mobileApps().byMobileAppId("{mobileApp-id}").patch(mobileApp);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
const mobileApp = {
'@odata.type': '#microsoft.graph.win32LobApp',
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',
committedContentVersion: 'Committed Content Version value',
fileName: 'File Name value',
size: 4,
installCommandLine: 'Install Command Line value',
uninstallCommandLine: 'Uninstall Command Line value',
applicableArchitectures: 'x86',
minimumFreeDiskSpaceInMB: 8,
minimumMemoryInMB: 1,
minimumNumberOfProcessors: 9,
minimumCpuSpeedInMHz: 4,
rules: [
{
'@odata.type': 'microsoft.graph.win32LobAppRegistryRule',
ruleType: 'requirement',
check32BitOn64System: true,
keyPath: 'Key Path value',
valueName: 'Value Name value',
operationType: 'exists',
operator: 'equal',
comparisonValue: 'Comparison Value value'
}
],
installExperience: {
'@odata.type': 'microsoft.graph.win32LobAppInstallExperience',
runAsAccount: 'user',
deviceRestartBehavior: 'allow'
},
returnCodes: [
{
'@odata.type': 'microsoft.graph.win32LobAppReturnCode',
returnCode: 10,
type: 'success'
}
],
msiInformation: {
'@odata.type': 'microsoft.graph.win32LobAppMsiInformation',
productCode: 'Product Code value',
productVersion: 'Product Version value',
upgradeCode: 'Upgrade Code value',
requiresReboot: true,
packageType: 'perUser',
productName: 'Product Name value',
publisher: 'Publisher value'
},
setupFilePath: 'Setup File Path value',
minimumSupportedWindowsRelease: 'Minimum Supported Windows Release value'
};
await client.api('/deviceAppManagement/mobileApps/{mobileAppId}')
.update(mobileApp);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\Win32LobApp;
use Microsoft\Graph\Generated\Models\MimeContent;
use Microsoft\Graph\Generated\Models\MobileAppPublishingState;
use Microsoft\Graph\Generated\Models\WindowsArchitecture;
use Microsoft\Graph\Generated\Models\Win32LobAppRule;
use Microsoft\Graph\Generated\Models\Win32LobAppRegistryRule;
use Microsoft\Graph\Generated\Models\Win32LobAppRuleType;
use Microsoft\Graph\Generated\Models\Win32LobAppRegistryRuleOperationType;
use Microsoft\Graph\Generated\Models\Win32LobAppRuleOperator;
use Microsoft\Graph\Generated\Models\Win32LobAppInstallExperience;
use Microsoft\Graph\Generated\Models\RunAsAccountType;
use Microsoft\Graph\Generated\Models\Win32LobAppRestartBehavior;
use Microsoft\Graph\Generated\Models\Win32LobAppReturnCode;
use Microsoft\Graph\Generated\Models\Win32LobAppReturnCodeType;
use Microsoft\Graph\Generated\Models\Win32LobAppMsiInformation;
use Microsoft\Graph\Generated\Models\Win32LobAppMsiPackageType;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new Win32LobApp();
$requestBody->setOdataType('#microsoft.graph.win32LobApp');
$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->setCommittedContentVersion('Committed Content Version value');
$requestBody->setFileName('File Name value');
$requestBody->setSize(4);
$requestBody->setInstallCommandLine('Install Command Line value');
$requestBody->setUninstallCommandLine('Uninstall Command Line value');
$requestBody->setApplicableArchitectures(new WindowsArchitecture('x86'));
$requestBody->setMinimumFreeDiskSpaceInMB(8);
$requestBody->setMinimumMemoryInMB(1);
$requestBody->setMinimumNumberOfProcessors(9);
$requestBody->setMinimumCpuSpeedInMHz(4);
$rulesWin32LobAppRule1 = new Win32LobAppRegistryRule();
$rulesWin32LobAppRule1->setOdataType('microsoft.graph.win32LobAppRegistryRule');
$rulesWin32LobAppRule1->setRuleType(new Win32LobAppRuleType('requirement'));
$rulesWin32LobAppRule1->setCheck32BitOn64System(true);
$rulesWin32LobAppRule1->setKeyPath('Key Path value');
$rulesWin32LobAppRule1->setValueName('Value Name value');
$rulesWin32LobAppRule1->setOperationType(new Win32LobAppRegistryRuleOperationType('exists'));
$rulesWin32LobAppRule1->setOperator(new Win32LobAppRuleOperator('equal'));
$rulesWin32LobAppRule1->setComparisonValue('Comparison Value value');
$rulesArray []= $rulesWin32LobAppRule1;
$requestBody->setRules($rulesArray);
$installExperience = new Win32LobAppInstallExperience();
$installExperience->setOdataType('microsoft.graph.win32LobAppInstallExperience');
$installExperience->setRunAsAccount(new RunAsAccountType('user'));
$installExperience->setDeviceRestartBehavior(new Win32LobAppRestartBehavior('allow'));
$requestBody->setInstallExperience($installExperience);
$returnCodesWin32LobAppReturnCode1 = new Win32LobAppReturnCode();
$returnCodesWin32LobAppReturnCode1->setOdataType('microsoft.graph.win32LobAppReturnCode');
$returnCodesWin32LobAppReturnCode1->setReturnCode(10);
$returnCodesWin32LobAppReturnCode1->setType(new Win32LobAppReturnCodeType('success'));
$returnCodesArray []= $returnCodesWin32LobAppReturnCode1;
$requestBody->setReturnCodes($returnCodesArray);
$msiInformation = new Win32LobAppMsiInformation();
$msiInformation->setOdataType('microsoft.graph.win32LobAppMsiInformation');
$msiInformation->setProductCode('Product Code value');
$msiInformation->setProductVersion('Product Version value');
$msiInformation->setUpgradeCode('Upgrade Code value');
$msiInformation->setRequiresReboot(true);
$msiInformation->setPackageType(new Win32LobAppMsiPackageType('perUser'));
$msiInformation->setProductName('Product Name value');
$msiInformation->setPublisher('Publisher value');
$requestBody->setMsiInformation($msiInformation);
$requestBody->setSetupFilePath('Setup File Path value');
$requestBody->setMinimumSupportedWindowsRelease('Minimum Supported Windows Release value');
$result = $graphServiceClient->deviceAppManagement()->mobileApps()->byMobileAppId('mobileApp-id')->patch($requestBody)->wait();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
Import-Module Microsoft.Graph.Devices.CorporateManagement
$params = @{
"@odata.type" = "#microsoft.graph.win32LobApp"
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"
committedContentVersion = "Committed Content Version value"
fileName = "File Name value"
size =
installCommandLine = "Install Command Line value"
uninstallCommandLine = "Uninstall Command Line value"
applicableArchitectures = "x86"
minimumFreeDiskSpaceInMB =
minimumMemoryInMB =
minimumNumberOfProcessors =
minimumCpuSpeedInMHz =
rules = @(
@{
"@odata.type" = "microsoft.graph.win32LobAppRegistryRule"
ruleType = "requirement"
check32BitOn64System = $true
keyPath = "Key Path value"
valueName = "Value Name value"
operationType = "exists"
operator = "equal"
comparisonValue = "Comparison Value value"
}
)
installExperience = @{
"@odata.type" = "microsoft.graph.win32LobAppInstallExperience"
runAsAccount = "user"
deviceRestartBehavior = "allow"
}
returnCodes = @(
@{
"@odata.type" = "microsoft.graph.win32LobAppReturnCode"
returnCode =
type = "success"
}
)
msiInformation = @{
"@odata.type" = "microsoft.graph.win32LobAppMsiInformation"
productCode = "Product Code value"
productVersion = "Product Version value"
upgradeCode = "Upgrade Code value"
requiresReboot = $true
packageType = "perUser"
productName = "Product Name value"
publisher = "Publisher value"
}
setupFilePath = "Setup File Path value"
minimumSupportedWindowsRelease = "Minimum Supported Windows Release value"
}
Update-MgDeviceAppManagementMobileApp -MobileAppId $mobileAppId -BodyParameter $params
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.win32_lob_app import Win32LobApp
from msgraph.generated.models.mime_content import MimeContent
from msgraph.generated.models.mobile_app_publishing_state import MobileAppPublishingState
from msgraph.generated.models.windows_architecture import WindowsArchitecture
from msgraph.generated.models.win32_lob_app_rule import Win32LobAppRule
from msgraph.generated.models.win32_lob_app_registry_rule import Win32LobAppRegistryRule
from msgraph.generated.models.win32_lob_app_rule_type import Win32LobAppRuleType
from msgraph.generated.models.win32_lob_app_registry_rule_operation_type import Win32LobAppRegistryRuleOperationType
from msgraph.generated.models.win32_lob_app_rule_operator import Win32LobAppRuleOperator
from msgraph.generated.models.win32_lob_app_install_experience import Win32LobAppInstallExperience
from msgraph.generated.models.run_as_account_type import RunAsAccountType
from msgraph.generated.models.win32_lob_app_restart_behavior import Win32LobAppRestartBehavior
from msgraph.generated.models.win32_lob_app_return_code import Win32LobAppReturnCode
from msgraph.generated.models.win32_lob_app_return_code_type import Win32LobAppReturnCodeType
from msgraph.generated.models.win32_lob_app_msi_information import Win32LobAppMsiInformation
from msgraph.generated.models.win32_lob_app_msi_package_type import Win32LobAppMsiPackageType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = Win32LobApp(
odata_type = "#microsoft.graph.win32LobApp",
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,
committed_content_version = "Committed Content Version value",
file_name = "File Name value",
size = 4,
install_command_line = "Install Command Line value",
uninstall_command_line = "Uninstall Command Line value",
applicable_architectures = WindowsArchitecture.X86,
minimum_free_disk_space_in_m_b = 8,
minimum_memory_in_m_b = 1,
minimum_number_of_processors = 9,
minimum_cpu_speed_in_m_hz = 4,
rules = [
Win32LobAppRegistryRule(
odata_type = "microsoft.graph.win32LobAppRegistryRule",
rule_type = Win32LobAppRuleType.Requirement,
check32_bit_on64_system = True,
key_path = "Key Path value",
value_name = "Value Name value",
operation_type = Win32LobAppRegistryRuleOperationType.Exists,
operator = Win32LobAppRuleOperator.Equal,
comparison_value = "Comparison Value value",
),
],
install_experience = Win32LobAppInstallExperience(
odata_type = "microsoft.graph.win32LobAppInstallExperience",
run_as_account = RunAsAccountType.User,
device_restart_behavior = Win32LobAppRestartBehavior.Allow,
),
return_codes = [
Win32LobAppReturnCode(
odata_type = "microsoft.graph.win32LobAppReturnCode",
return_code = 10,
type = Win32LobAppReturnCodeType.Success,
),
],
msi_information = Win32LobAppMsiInformation(
odata_type = "microsoft.graph.win32LobAppMsiInformation",
product_code = "Product Code value",
product_version = "Product Version value",
upgrade_code = "Upgrade Code value",
requires_reboot = True,
package_type = Win32LobAppMsiPackageType.PerUser,
product_name = "Product Name value",
publisher = "Publisher value",
),
setup_file_path = "Setup File Path value",
minimum_supported_windows_release = "Minimum Supported Windows Release value",
)
result = await graph_client.device_app_management.mobile_apps.by_mobile_app_id('mobileApp-id').patch(request_body)
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
以下は、応答の例です。 注: 簡潔にするために、ここに示す応答オブジェクトは切り詰められている場合があります。 実際の呼び出しではすべてのプロパティが返されます。