创建 androidManagedStoreAppCreate androidManagedStoreApp

命名空间:microsoft.graphNamespace: microsoft.graph

重要说明: /Beta 版本下的 Microsoft Graph Api 可能会发生更改;不支持生产使用。Important: Microsoft Graph APIs under the /beta version are subject to change; production use is not supported.

注意: 适用于 Intune 的 Microsoft Graph API 需要适用于租户的活动 Intune 许可证Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.

创建新的 androidManagedStoreApp 对象。Create a new androidManagedStoreApp object.

先决条件Prerequisites

要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限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 most to least privileged)
委派(工作或学校帐户)Delegated (work or school account) DeviceManagementApps.ReadWrite.AllDeviceManagementApps.ReadWrite.All
委派(个人 Microsoft 帐户)Delegated (personal Microsoft account) 不支持。Not supported.
应用程序Application DeviceManagementApps.ReadWrite.AllDeviceManagementApps.ReadWrite.All

HTTP 请求HTTP Request

POST /deviceAppManagement/mobileApps

请求标头Request headers

标头Header Value
AuthorizationAuthorization Bearer <token>。必需。Bearer <token> Required.
接受Accept application/jsonapplication/json

请求正文Request body

在请求正文中,提供 androidManagedStoreApp 对象的 JSON 表示形式。In the request body, supply a JSON representation for the androidManagedStoreApp object.

下表显示创建 androidManagedStoreApp 时所需的属性。The following table shows the properties that are required when you create the androidManagedStoreApp.

属性Property 类型Type 说明Description
idid StringString 实体的键。Key of the entity. 继承自 mobileAppInherited from mobileApp
displayNamedisplayName StringString 管理员提供或导入的应用标题。The admin provided or imported title of the app. 继承自 mobileAppInherited from mobileApp
descriptiondescription StringString 应用的说明。The description of the app. 继承自 mobileAppInherited from mobileApp
publisherpublisher StringString 应用的发布者。The publisher of the app. 继承自 mobileAppInherited from mobileApp
largeIconlargeIcon mimeContentmimeContent 要显示在应用详细信息中并用于图标上传的大图标。The large icon, to be displayed in the app details and used for upload of the icon. 继承自 mobileAppInherited from mobileApp
createdDateTimecreatedDateTime DateTimeOffsetDateTimeOffset 创建应用的日期和时间。The date and time the app was created. 继承自 mobileAppInherited from mobileApp
lastModifiedDateTimelastModifiedDateTime DateTimeOffsetDateTimeOffset 上次修改应用的日期和时间。The date and time the app was last modified. 继承自 mobileAppInherited from mobileApp
isFeaturedisFeatured BooleanBoolean 指示应用是否被管理员标记为特色的值。继承自 mobileAppThe value indicating whether the app is marked as featured by the admin. Inherited from mobileApp
privacyInformationUrlprivacyInformationUrl StringString 隐私声明 URL。The privacy statement Url. 继承自 mobileAppInherited from mobileApp
informationUrlinformationUrl StringString 详细信息 URL。The more information Url. 继承自 mobileAppInherited from mobileApp
所有者owner StringString 应用的所有者。The owner of the app. 继承自 mobileAppInherited from mobileApp
developerdeveloper StringString 应用的开发者。The developer of the app. 继承自 mobileAppInherited from mobileApp
notesnotes StringString 应用的备注。Notes for the app. 继承自 mobileAppInherited from mobileApp
uploadStateuploadState Int32Int32 上载状态。The upload state. 可能的值包括: 0- Not Ready 、1- Ready 、2- ProcessingPossible values are: 0 - Not Ready, 1 - Ready, 2 - Processing. 继承自 mobileAppInherited from mobileApp
publishingStatepublishingState mobileAppPublishingStatemobileAppPublishingState 应用的发布状态。The publishing state for the app. 除非应用已发布,否则无法分配应用。The app cannot be assigned unless the app is published. 继承自 mobileAppInherited from mobileApp. 可取值为:notPublishedprocessingpublishedPossible values are: notPublished, processing, published.
isAssignedisAssigned BooleanBoolean 指示是否至少向一个组分配了应用程序的值。The value indicating whether the app is assigned to at least one group. 继承自 mobileAppInherited from mobileApp
roleScopeTagIdsroleScopeTagIds 字符串集合String collection 此移动应用的作用域标记 id 列表。List of scope tag ids for this mobile app. 继承自 mobileAppInherited from mobileApp
dependentAppCountdependentAppCount Int32Int32 子应用程序的依赖项总数。The total number of dependencies the child app has. 继承自 mobileAppInherited from mobileApp
packageIdpackageId StringString 包标识符。The package identifier.
appIdentifierappIdentifier StringString 标识名称。The Identity Name.
usedLicenseCountusedLicenseCount Int32Int32 使用中的 VPP 许可证数量。The number of VPP licenses in use.
totalLicenseCounttotalLicenseCount Int32Int32 VPP 许可证的总数。The total number of VPP licenses.
appStoreUrlappStoreUrl StringString "播放工作商店" 应用程序 URL。The Play for Work Store app URL.
isPrivateisPrivate 布尔值Boolean 指示应用程序是否仅适用于给定企业的用户。Indicates whether the app is only available to a given enterprise's users.
isSystemAppisSystemApp 布尔值Boolean 指示应用程序是否为预安装的系统应用程序。Indicates whether the app is a preinstalled system app.
appTracksappTracks androidManagedStoreAppTrack 集合androidManagedStoreAppTrack collection 对此企业可见的曲目。The tracks that are visible to this enterprise.
supportsOemConfigsupportsOemConfig 布尔值Boolean 此应用是否支持 OEMConfig 策略。Whether this app supports OEMConfig policy.

响应Response

如果成功,此方法 201 Created 在响应正文中返回响应代码和 androidManagedStoreApp 对象。If successful, this method returns a 201 Created response code and a androidManagedStoreApp object in the response body.

示例Example

请求Request

下面是一个请求示例。Here is an example of the request.

POST https://graph.microsoft.com/beta/deviceAppManagement/mobileApps
Content-type: application/json
Content-length: 1168

{
  "@odata.type": "#microsoft.graph.androidManagedStoreApp",
  "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,
  "packageId": "Package Id value",
  "appIdentifier": "App Identifier value",
  "usedLicenseCount": 0,
  "totalLicenseCount": 1,
  "appStoreUrl": "https://example.com/appStoreUrl/",
  "isPrivate": true,
  "isSystemApp": true,
  "appTracks": [
    {
      "@odata.type": "microsoft.graph.androidManagedStoreAppTrack",
      "trackId": "Track Id value",
      "trackAlias": "Track Alias value"
    }
  ],
  "supportsOemConfig": true
}

响应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: 1340

{
  "@odata.type": "#microsoft.graph.androidManagedStoreApp",
  "id": "87247525-7525-8724-2575-248725752487",
  "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,
  "packageId": "Package Id value",
  "appIdentifier": "App Identifier value",
  "usedLicenseCount": 0,
  "totalLicenseCount": 1,
  "appStoreUrl": "https://example.com/appStoreUrl/",
  "isPrivate": true,
  "isSystemApp": true,
  "appTracks": [
    {
      "@odata.type": "microsoft.graph.androidManagedStoreAppTrack",
      "trackId": "Track Id value",
      "trackAlias": "Track Alias value"
    }
  ],
  "supportsOemConfig": true
}