创建 androidWorkProfileEnterpriseWiFiConfigurationCreate androidWorkProfileEnterpriseWiFiConfiguration

命名空间: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.

创建新的 androidWorkProfileEnterpriseWiFiConfiguration 对象。Create a new androidWorkProfileEnterpriseWiFiConfiguration 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) DeviceManagementConfiguration.ReadWrite.AllDeviceManagementConfiguration.ReadWrite.All
委派(个人 Microsoft 帐户)Delegated (personal Microsoft account) 不支持。Not supported.
应用程序Application DeviceManagementConfiguration.ReadWrite.AllDeviceManagementConfiguration.ReadWrite.All

HTTP 请求HTTP Request

POST /deviceManagement/deviceConfigurations
POST /deviceManagement/deviceConfigurations/{deviceConfigurationId}/microsoft.graph.windowsDomainJoinConfiguration/networkAccessConfigurations

请求标头Request headers

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

请求正文Request body

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

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

属性Property 类型Type 说明Description
idid StringString 实体的键。Key of the entity. 继承自 deviceConfigurationInherited from deviceConfiguration
lastModifiedDateTimelastModifiedDateTime DateTimeOffsetDateTimeOffset 上次修改对象的日期/时间。DateTime the object was last modified. 继承自 deviceConfigurationInherited from deviceConfiguration
roleScopeTagIdsroleScopeTagIds String 集合String collection 此实体实例的范围标记列表。List of Scope Tags for this Entity instance. 继承自 deviceConfigurationInherited from deviceConfiguration
supportsScopeTagssupportsScopeTags BooleanBoolean 指示基础设备配置是否支持作用域标记的分配。Indicates whether or not the underlying Device Configuration supports the assignment of scope tags. 如果此值为 false,则不允许分配给 ScopeTags 属性,并且实体将对作用域用户不可见。Assigning to the ScopeTags property is not allowed when this value is false and entities will not be visible to scoped users. 这适用于在 Silverlight 中创建的旧版策略,可以通过在 Azure 门户中删除并重新创建策略来解决此事件。This occurs for Legacy policies created in Silverlight and can be resolved by deleting and recreating the policy in the Azure Portal. 此属性是只读的。This property is read-only. 继承自 deviceConfigurationInherited from deviceConfiguration
deviceManagementApplicabilityRuleOsEditiondeviceManagementApplicabilityRuleOsEdition deviceManagementApplicabilityRuleOsEditiondeviceManagementApplicabilityRuleOsEdition 适用于此策略的操作系统版本。The OS edition applicability for this Policy. 继承自 deviceConfigurationInherited from deviceConfiguration
deviceManagementApplicabilityRuleOsVersiondeviceManagementApplicabilityRuleOsVersion deviceManagementApplicabilityRuleOsVersiondeviceManagementApplicabilityRuleOsVersion 此策略的操作系统版本适用性规则。The OS version applicability rule for this Policy. 继承自 deviceConfigurationInherited from deviceConfiguration
deviceManagementApplicabilityRuleDeviceModedeviceManagementApplicabilityRuleDeviceMode deviceManagementApplicabilityRuleDeviceModedeviceManagementApplicabilityRuleDeviceMode 此策略的设备模式适用性规则。The device mode applicability rule for this Policy. 继承自 deviceConfigurationInherited from deviceConfiguration
createdDateTimecreatedDateTime DateTimeOffsetDateTimeOffset 创建对象的日期/时间。DateTime the object was created. 继承自 deviceConfigurationInherited from deviceConfiguration
descriptiondescription StringString 管理员提供的设备配置的说明。Admin provided description of the Device Configuration. 继承自 deviceConfigurationInherited from deviceConfiguration
displayNamedisplayName StringString 管理员提供的设备配置的名称。Admin provided name of the device configuration. 继承自 deviceConfigurationInherited from deviceConfiguration
versionversion Int32Int32 设备配置的版本。Version of the device configuration. 继承自 deviceConfigurationInherited from deviceConfiguration
networkNamenetworkName StringString AndroidWorkProfileWiFiConfiguration继承的网络名称Network Name Inherited from androidWorkProfileWiFiConfiguration
ssidssid StringString 这是广播到所有设备的 Wi-fi 网络的名称。This is the name of the Wi-Fi network that is broadcast to all devices. 继承自 androidWorkProfileWiFiConfigurationInherited from androidWorkProfileWiFiConfiguration
connectAutomaticallyconnectAutomatically BooleanBoolean 当此网络在范围内时自动连接。Connect automatically when this network is in range. 将此设置为 true 将跳过用户提示,并自动将设备连接到 Wlan 网络。Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. 继承自 androidWorkProfileWiFiConfigurationInherited from androidWorkProfileWiFiConfiguration
connectWhenNetworkNameIsHiddenconnectWhenNetworkNameIsHidden BooleanBoolean 当设置为 true 时,此配置文件将强制设备连接到不会将其 SSID 广播给所有设备的网络。When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. 继承自 androidWorkProfileWiFiConfigurationInherited from androidWorkProfileWiFiConfiguration
wiFiSecurityTypewiFiSecurityType androidWiFiSecurityTypeandroidWiFiSecurityType 指示 Wi-fi 终结点是否使用基于 EAP 的安全类型。Indicates whether Wi-Fi endpoint uses an EAP based security type. 继承自 androidWorkProfileWiFiConfigurationInherited from androidWorkProfileWiFiConfiguration. 可取值为:openwpaEnterprisewpa2EnterprisePossible values are: open, wpaEnterprise, wpa2Enterprise.
eapTypeeapType androidEapTypeandroidEapType 指示 Wi-fi 终结点 (路由器) 上的 EAP 协议集的类型。Indicates the type of EAP protocol set on the Wi-Fi endpoint (router). 可取值为:eapTlseapTtlspeapPossible values are: eapTls, eapTtls, peap.
authenticationMethodauthenticationMethod wiFiAuthenticationMethodwiFiAuthenticationMethod 指示在将 EAP 类型配置为 PEAP 或 EAP-TTLS 时,客户端 (设备) 需要使用的身份验证方法。Indicates the Authentication Method the client (device) needs to use when the EAP Type is configured to PEAP or EAP-TTLS. 可取值为:certificateusernameAndPasswordderivedCredentialPossible values are: certificate, usernameAndPassword, derivedCredential.
innerAuthenticationProtocolForEapTtlsinnerAuthenticationProtocolForEapTtls nonEapAuthenticationMethodForEapTtlsTypenonEapAuthenticationMethodForEapTtlsType 在 EAP 类型为 EAP 时,用于身份验证的非 EAP 方法 (内部标识) (eap 类型为 EAP-TTLS,Authenticationmethod 为用户名和密码)。Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. 可取值为:unencryptedPasswordchallengeHandshakeAuthenticationProtocolmicrosoftChapmicrosoftChapVersionTwoPossible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo.
innerAuthenticationProtocolForPeapinnerAuthenticationProtocolForPeap nonEapAuthenticationMethodForPeapnonEapAuthenticationMethodForPeap 在 EAP 类型为 PEAP 且 Authenticationmethod 为用户名和密码时,身份验证 (内部标识) 的非 EAP 方法。Non-EAP Method for Authentication (Inner Identity) when EAP Type is PEAP and Authenticationmethod is Username and Password. 可取值为:nonemicrosoftChapVersionTwoPossible values are: none, microsoftChapVersionTwo.
outerIdentityPrivacyTemporaryValueouterIdentityPrivacyTemporaryValue StringString 将 EAP 类型配置为 EAP-TTLS 或 PEAP 时,请启用标识隐私 (外部标识) 。Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS or PEAP. 此处提供的字符串用于在用户尝试连接到 Wlan 网络时屏蔽各个用户的用户名。The String provided here is used to mask the username of individual users when they attempt to connect to Wi-Fi network.
proxySettingsproxySettings wiFiProxySettingwiFiProxySetting 此 Wlan 连接的代理类型。Proxy Type for this Wi-Fi connection. 可取值为:nonemanualautomaticPossible values are: none, manual, automatic.
proxyAutomaticConfigurationUrlproxyAutomaticConfigurationUrl StringString 选择 "自动配置" 时代理服务器的 "自动配置" 脚本的 URL。URL of the proxy server automatic configuration script when automatic configuration is selected. 此 URL 通常是 PAC (代理自动配置) 文件的位置。This URL is typically the location of PAC (Proxy Auto Configuration) file.

响应Response

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

示例Example

请求Request

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

POST https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations
Content-type: application/json
Content-length: 1671

{
  "@odata.type": "#microsoft.graph.androidWorkProfileEnterpriseWiFiConfiguration",
  "roleScopeTagIds": [
    "Role Scope Tag Ids value"
  ],
  "supportsScopeTags": true,
  "deviceManagementApplicabilityRuleOsEdition": {
    "@odata.type": "microsoft.graph.deviceManagementApplicabilityRuleOsEdition",
    "osEditionTypes": [
      "windows10EnterpriseN"
    ],
    "name": "Name value",
    "ruleType": "exclude"
  },
  "deviceManagementApplicabilityRuleOsVersion": {
    "@odata.type": "microsoft.graph.deviceManagementApplicabilityRuleOsVersion",
    "minOSVersion": "Min OSVersion value",
    "maxOSVersion": "Max OSVersion value",
    "name": "Name value",
    "ruleType": "exclude"
  },
  "deviceManagementApplicabilityRuleDeviceMode": {
    "@odata.type": "microsoft.graph.deviceManagementApplicabilityRuleDeviceMode",
    "deviceMode": "sModeConfiguration",
    "name": "Name value",
    "ruleType": "exclude"
  },
  "description": "Description value",
  "displayName": "Display Name value",
  "version": 7,
  "networkName": "Network Name value",
  "ssid": "Ssid value",
  "connectAutomatically": true,
  "connectWhenNetworkNameIsHidden": true,
  "wiFiSecurityType": "wpaEnterprise",
  "eapType": "eapTtls",
  "authenticationMethod": "usernameAndPassword",
  "innerAuthenticationProtocolForEapTtls": "challengeHandshakeAuthenticationProtocol",
  "innerAuthenticationProtocolForPeap": "microsoftChapVersionTwo",
  "outerIdentityPrivacyTemporaryValue": "Outer Identity Privacy Temporary Value value",
  "proxySettings": "manual",
  "proxyAutomaticConfigurationUrl": "https://example.com/proxyAutomaticConfigurationUrl/"
}

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

{
  "@odata.type": "#microsoft.graph.androidWorkProfileEnterpriseWiFiConfiguration",
  "id": "c48cd726-d726-c48c-26d7-8cc426d78cc4",
  "lastModifiedDateTime": "2017-01-01T00:00:35.1329464-08:00",
  "roleScopeTagIds": [
    "Role Scope Tag Ids value"
  ],
  "supportsScopeTags": true,
  "deviceManagementApplicabilityRuleOsEdition": {
    "@odata.type": "microsoft.graph.deviceManagementApplicabilityRuleOsEdition",
    "osEditionTypes": [
      "windows10EnterpriseN"
    ],
    "name": "Name value",
    "ruleType": "exclude"
  },
  "deviceManagementApplicabilityRuleOsVersion": {
    "@odata.type": "microsoft.graph.deviceManagementApplicabilityRuleOsVersion",
    "minOSVersion": "Min OSVersion value",
    "maxOSVersion": "Max OSVersion value",
    "name": "Name value",
    "ruleType": "exclude"
  },
  "deviceManagementApplicabilityRuleDeviceMode": {
    "@odata.type": "microsoft.graph.deviceManagementApplicabilityRuleDeviceMode",
    "deviceMode": "sModeConfiguration",
    "name": "Name value",
    "ruleType": "exclude"
  },
  "createdDateTime": "2017-01-01T00:02:43.5775965-08:00",
  "description": "Description value",
  "displayName": "Display Name value",
  "version": 7,
  "networkName": "Network Name value",
  "ssid": "Ssid value",
  "connectAutomatically": true,
  "connectWhenNetworkNameIsHidden": true,
  "wiFiSecurityType": "wpaEnterprise",
  "eapType": "eapTtls",
  "authenticationMethod": "usernameAndPassword",
  "innerAuthenticationProtocolForEapTtls": "challengeHandshakeAuthenticationProtocol",
  "innerAuthenticationProtocolForPeap": "microsoftChapVersionTwo",
  "outerIdentityPrivacyTemporaryValue": "Outer Identity Privacy Temporary Value value",
  "proxySettings": "manual",
  "proxyAutomaticConfigurationUrl": "https://example.com/proxyAutomaticConfigurationUrl/"
}