Criar deviceManagementConfigurationSetting
Namespace: microsoft.graph
Importante: As APIs do Microsoft Graph na versão /beta estão sujeitas a alterações; a utilização de produção não é suportada.
Observação: A API do Microsoft Graph para Intune requer uma licença ativa do Intune para o locatário.
Crie um novo objeto deviceManagementConfigurationSetting .
Esta API está disponível nas seguintes implementações de cloud nacionais.
Serviço global | US Government L4 | US Government L5 (DOD) | China operada pela 21Vianet |
---|---|---|---|
✅ | ✅ | ✅ | ✅ |
Permissões
Uma das seguintes permissões é necessária para chamar esta API. Para saber mais, incluindo como escolher permissões, confira Permissões.
Tipo de permissão | Permissões (da com menos para a com mais privilégios) |
---|---|
Delegado (conta corporativa ou de estudante) | DeviceManagementConfiguration.ReadWrite.All |
Delegado (conta pessoal da Microsoft) | Sem suporte. |
Application | DeviceManagementConfiguration.ReadWrite.All |
Solicitação HTTP
POST /deviceManagement/compliancePolicies/{deviceManagementCompliancePolicyId}/settings
POST /deviceManagement/configurationPolicies/{deviceManagementConfigurationPolicyId}/settings
Cabeçalhos de solicitação
Cabeçalho | Valor |
---|---|
Autorização | {token} de portador. Obrigatório. Saiba mais sobre autenticação e autorização. |
Aceitar | application/json |
Corpo da solicitação
No corpo do pedido, forneça uma representação JSON para o objeto deviceManagementConfigurationSetting.
A tabela seguinte mostra as propriedades necessárias quando cria o deviceManagementConfigurationSetting.
Propriedade | Tipo | Descrição |
---|---|---|
id | Cadeia de caracteres | Chave desta definição na política que a contém. Gerado automaticamente. |
settingInstance | deviceManagementConfigurationSettingInstance | Instância de Definição |
Resposta
Se for bem-sucedido, este método devolve um 201 Created
código de resposta e um objeto deviceManagementConfigurationSetting no corpo da resposta.
Exemplo
Solicitação
Este é um exemplo da solicitação.
POST https://graph.microsoft.com/beta/deviceManagement/compliancePolicies/{deviceManagementCompliancePolicyId}/settings
Content-type: application/json
Content-length: 16129
{
"@odata.type": "#microsoft.graph.deviceManagementConfigurationSetting",
"settingInstance": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": null,
"settingInstanceTemplateReference": null,
"choiceSettingValue": null
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
}
Resposta
Veja a seguir um exemplo da resposta. Observação: o objeto response mostrado aqui pode estar truncado por motivos de concisão. Todas as propriedades serão retornadas de uma chamada real.
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 16178
{
"@odata.type": "#microsoft.graph.deviceManagementConfigurationSetting",
"id": "9acf977e-977e-9acf-7e97-cf9a7e97cf9a",
"settingInstance": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": null,
"settingInstanceTemplateReference": null,
"choiceSettingValue": null
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
}