更新 officeSuiteApp

命名空间:microsoft.graph

重要提示: Microsoft Graph /beta 版本下的 API 可能会更改;不支持生产使用。

注意: 适用于 Intune 的 Microsoft Graph API 需要适用于租户的 活动 Intune 许可证

更新 officeSuiteApp 对象 的属性。

先决条件

要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限

权限类型 权限(从最低特权到最高特权)
委派(工作或学校帐户) DeviceManagementApps.ReadWrite.All
委派(个人 Microsoft 帐户) 不支持。
应用程序 DeviceManagementApps.ReadWrite.All

HTTP 请求

PATCH /deviceAppManagement/mobileApps/{mobileAppId}
PATCH /deviceAppManagement/mobileApps/{mobileAppId}/userStatuses/{userAppInstallStatusId}/app
PATCH /deviceAppManagement/mobileApps/{mobileAppId}/deviceStatuses/{mobileAppInstallStatusId}/app

请求标头

标头
Authorization Bearer <token>。必需。
接受 application/json

请求正文

在请求正文中,提供 officeSuiteApp 对象的 JSON 表示形式。

下表显示创建 officeSuiteApp 时所需的属性

属性 类型 说明
id String 实体的键。 继承自 mobileApp
displayName String 管理员提供或导入的应用标题。 继承自 mobileApp
说明 String 应用的说明。 继承自 mobileApp
publisher String 应用的发布者。 继承自 mobileApp
largeIcon mimeContent 要显示在应用详细信息中并用于图标上传的大图标。 继承自 mobileApp
createdDateTime DateTimeOffset 创建应用的日期和时间。 继承自 mobileApp
lastModifiedDateTime DateTimeOffset 上次修改应用的日期和时间。 继承自 mobileApp
isFeatured Boolean 指示应用是否被管理员标记为特色的值。继承自 mobileApp
privacyInformationUrl String 隐私声明 URL。 继承自 mobileApp
informationUrl String 详细信息 URL。 继承自 mobileApp
owner String 应用的所有者。 继承自 mobileApp
developer String 应用的开发者。 继承自 mobileApp
notes String 应用的备注。 继承自 mobileApp
uploadState Int32 上载状态。 可能的值是:0 - Not Ready 、1 - Ready 、2 - Processing 。 继承自 mobileApp
publishingState mobileAppPublishingState 应用的发布状态。 除非应用已发布,否则无法分配应用。 继承自 mobileApp。 可取值为:notPublishedprocessingpublished
isAssigned Boolean 指示是否将应用分配给至少一个组的值。 继承自 mobileApp
roleScopeTagIds String collection 此移动应用的范围标记 ID 列表。 继承自 mobileApp
dependentAppCount Int32 子应用具有的依赖项总数。 继承自 mobileApp
supersedingAppCount Int32 此应用直接或间接取代的应用总数。 继承自 mobileApp
supersededAppCount Int32 此应用直接或间接被取代的应用总数。 继承自 mobileApp
autoAcceptEula Boolean 在最终用户的设备上自动接受 EULA 的值。
productIds officeProductId 集合 表示 Office365 套件 SKU 的产品 ID。 可取值为:o365ProPlusRetailo365BusinessRetailvisioProRetailprojectProRetail
excludedApps excludedApps 表示从所选 Office365 产品 ID 中排除的应用的属性。
useSharedComputerActivation Boolean 表示共享计算机激活是否不用于 Office365 应用套件的属性。
updateChannel officeUpdateChannel 表示 Office365 更新频道的属性。 可取值为:nonecurrentdeferredfirstReleaseCurrentfirstReleaseDeferredmonthlyEnterprise
officePlatformArchitecture windowsArchitecture 表示 Office365 应用套件版本的 属性。 可取值为:nonex86x64armneutralarm64
localesToInstall String collection 表示安装 Office365 应用时安装区域设置的属性。 它使用标准 RFC 6033。 参考: https://technet.microsoft.com/library/cc179219(v=office.16).aspx|
installProgressDisplayLevel officeSuiteInstallProgressDisplayLevel 指定设备上安装进度安装程序 UI 的显示级别。 可取值为:nonefull
shouldUninstallOlderVersionsOfOffice Boolean 属性,确定是否卸载 MSI Office Office365 应用套件是否已部署到设备。
targetVersion String 表示 Office365 应用套件的特定目标版本的 属性,该版本应一直部署在设备上。
updateVersion String 表示特定目标版本可用于 Office365 应用套件的更新版本的 属性。
officeConfigurationXml 二进制 表示可针对专业增强版应用指定的 XML 配置文件Office属性。 优先于所有其他属性。 存在此参数时,XML 配置文件将用于创建应用。

响应

如果成功,此方法在响应正文中返回 响应代码和更新的 200 OK officeSuiteApp 对象。

示例

请求

下面是一个请求示例。

PATCH https://graph.microsoft.com/beta/deviceAppManagement/mobileApps/{mobileAppId}
Content-type: application/json
Content-length: 1675

{
  "@odata.type": "#microsoft.graph.officeSuiteApp",
  "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",
  "uploadState": 11,
  "publishingState": "processing",
  "isAssigned": true,
  "roleScopeTagIds": [
    "Role Scope Tag Ids value"
  ],
  "dependentAppCount": 1,
  "supersedingAppCount": 3,
  "supersededAppCount": 2,
  "autoAcceptEula": true,
  "productIds": [
    "o365BusinessRetail"
  ],
  "excludedApps": {
    "@odata.type": "microsoft.graph.excludedApps",
    "access": true,
    "bing": true,
    "excel": true,
    "groove": true,
    "infoPath": true,
    "lync": true,
    "oneDrive": true,
    "oneNote": true,
    "outlook": true,
    "powerPoint": true,
    "publisher": true,
    "sharePointDesigner": true,
    "teams": true,
    "visio": true,
    "word": true
  },
  "useSharedComputerActivation": true,
  "updateChannel": "current",
  "officePlatformArchitecture": "x86",
  "localesToInstall": [
    "Locales To Install value"
  ],
  "installProgressDisplayLevel": "full",
  "shouldUninstallOlderVersionsOfOffice": true,
  "targetVersion": "Target Version value",
  "updateVersion": "Update Version value",
  "officeConfigurationXml": "b2ZmaWNlQ29uZmlndXJhdGlvblhtbA=="
}

响应

下面是一个响应示例。注意:为了简单起见,可能会将此处所示的响应对象截断。将从实际调用中返回所有属性。

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1847

{
  "@odata.type": "#microsoft.graph.officeSuiteApp",
  "id": "9b263b46-3b46-9b26-463b-269b463b269b",
  "displayName": "Display Name value",
  "description": "Description value",
  "publisher": "Publisher value",
  "largeIcon": {
    "@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",
  "isFeatured": true,
  "privacyInformationUrl": "https://example.com/privacyInformationUrl/",
  "informationUrl": "https://example.com/informationUrl/",
  "owner": "Owner value",
  "developer": "Developer value",
  "notes": "Notes value",
  "uploadState": 11,
  "publishingState": "processing",
  "isAssigned": true,
  "roleScopeTagIds": [
    "Role Scope Tag Ids value"
  ],
  "dependentAppCount": 1,
  "supersedingAppCount": 3,
  "supersededAppCount": 2,
  "autoAcceptEula": true,
  "productIds": [
    "o365BusinessRetail"
  ],
  "excludedApps": {
    "@odata.type": "microsoft.graph.excludedApps",
    "access": true,
    "bing": true,
    "excel": true,
    "groove": true,
    "infoPath": true,
    "lync": true,
    "oneDrive": true,
    "oneNote": true,
    "outlook": true,
    "powerPoint": true,
    "publisher": true,
    "sharePointDesigner": true,
    "teams": true,
    "visio": true,
    "word": true
  },
  "useSharedComputerActivation": true,
  "updateChannel": "current",
  "officePlatformArchitecture": "x86",
  "localesToInstall": [
    "Locales To Install value"
  ],
  "installProgressDisplayLevel": "full",
  "shouldUninstallOlderVersionsOfOffice": true,
  "targetVersion": "Target Version value",
  "updateVersion": "Update Version value",
  "officeConfigurationXml": "b2ZmaWNlQ29uZmlndXJhdGlvblhtbA=="
}