Namespace: microsoft.graph
Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.
Create a new mobileThreatDefenseConnector object.
This API is available in the following national cloud deployments.
Global service |
US Government L4 |
US Government L5 (DOD) |
China operated by 21Vianet |
✅ |
✅ |
✅ |
✅ |
Permissions
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 least to most privileged) |
Delegated (work or school account) |
DeviceManagementServiceConfig.ReadWrite.All, DeviceManagementConfiguration.ReadWrite.All |
Delegated (personal Microsoft account) |
Not supported. |
Application |
DeviceManagementServiceConfig.ReadWrite.All, DeviceManagementConfiguration.ReadWrite.All |
HTTP Request
POST /deviceManagement/mobileThreatDefenseConnectors
Request body
In the request body, supply a JSON representation for the mobileThreatDefenseConnector object.
The following table shows the properties that are required when you create the mobileThreatDefenseConnector.
Property |
Type |
Description |
id |
String |
Not yet documented |
lastHeartbeatDateTime |
DateTimeOffset |
DateTime of last Heartbeat recieved from the Mobile Threat Defense partner |
partnerState |
mobileThreatPartnerTenantState |
Mobile Threat Defense partner state for this account. Possible values are: unavailable , available , enabled , unresponsive . |
androidMobileApplicationManagementEnabled |
Boolean |
When TRUE, inidicates that data from the Mobile Threat Defense partner can be used during Mobile Application Management (MAM) evaluations for Android devices. When FALSE, inidicates that data from the Mobile Threat Defense partner should not be used during Mobile Application Management (MAM) evaluations for Android devices. Only one partner per platform may be enabled for Mobile Application Management (MAM) evaluation. Default value is FALSE. |
iosMobileApplicationManagementEnabled |
Boolean |
When TRUE, inidicates that data from the Mobile Threat Defense partner can be used during Mobile Application Management (MAM) evaluations for IOS devices. When FALSE, inidicates that data from the Mobile Threat Defense partner should not be used during Mobile Application Management (MAM) evaluations for IOS devices. Only one partner per platform may be enabled for Mobile Application Management (MAM) evaluation. Default value is FALSE. |
androidEnabled |
Boolean |
For Android, set whether data from the Mobile Threat Defense partner should be used during compliance evaluations |
iosEnabled |
Boolean |
For IOS, get or set whether data from the Mobile Threat Defense partner should be used during compliance evaluations |
windowsEnabled |
Boolean |
When TRUE, inidicates that data from the Mobile Threat Defense partner can be used during compliance evaluations for Windows. When FALSE, inidicates that data from the Mobile Threat Defense partner should not be used during compliance evaluations for Windows. Default value is FALSE. |
androidDeviceBlockedOnMissingPartnerData |
Boolean |
For Android, set whether Intune must receive data from the Mobile Threat Defense partner prior to marking a device compliant |
iosDeviceBlockedOnMissingPartnerData |
Boolean |
For IOS, set whether Intune must receive data from the Mobile Threat Defense partner prior to marking a device compliant |
windowsDeviceBlockedOnMissingPartnerData |
Boolean |
When TRUE, inidicates that Intune must receive data from the Mobile Threat Defense partner prior to marking a device compliant for Windows. When FALSE, inidicates that Intune may make a device compliant without receiving data from the Mobile Threat Defense partner for Windows. Default value is FALSE. |
partnerUnsupportedOsVersionBlocked |
Boolean |
Get or set whether to block devices on the enabled platforms that do not meet the minimum version requirements of the Mobile Threat Defense partner |
partnerUnresponsivenessThresholdInDays |
Int32 |
Get or Set days the per tenant tolerance to unresponsiveness for this partner integration |
allowPartnerToCollectIOSApplicationMetadata |
Boolean |
When TRUE, indicates the Mobile Threat Defense partner may collect metadata about installed applications from Intune for IOS devices. When FALSE, indicates the Mobile Threat Defense partner may not collect metadata about installed applications from Intune for IOS devices. Default value is FALSE. |
allowPartnerToCollectIOSPersonalApplicationMetadata |
Boolean |
When TRUE, indicates the Mobile Threat Defense partner may collect metadata about personally installed applications from Intune for IOS devices. When FALSE, indicates the Mobile Threat Defense partner may not collect metadata about personally installed applications from Intune for IOS devices. Default value is FALSE. |
microsoftDefenderForEndpointAttachEnabled |
Boolean |
When TRUE, inidicates that configuration profile management via Microsoft Defender for Endpoint is enabled. When FALSE, inidicates that configuration profile management via Microsoft Defender for Endpoint is disabled. Default value is FALSE. |
Response
If successful, this method returns a 201 Created
response code and a mobileThreatDefenseConnector object in the response body.
Example
Request
Here is an example of the request.
POST https://graph.microsoft.com/v1.0/deviceManagement/mobileThreatDefenseConnectors
Content-type: application/json
Content-length: 772
{
"@odata.type": "#microsoft.graph.mobileThreatDefenseConnector",
"lastHeartbeatDateTime": "2016-12-31T23:59:37.9174975-08:00",
"partnerState": "available",
"androidMobileApplicationManagementEnabled": true,
"iosMobileApplicationManagementEnabled": true,
"androidEnabled": true,
"iosEnabled": true,
"windowsEnabled": true,
"androidDeviceBlockedOnMissingPartnerData": true,
"iosDeviceBlockedOnMissingPartnerData": true,
"windowsDeviceBlockedOnMissingPartnerData": true,
"partnerUnsupportedOsVersionBlocked": true,
"partnerUnresponsivenessThresholdInDays": 6,
"allowPartnerToCollectIOSApplicationMetadata": true,
"allowPartnerToCollectIOSPersonalApplicationMetadata": true,
"microsoftDefenderForEndpointAttachEnabled": true
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new MobileThreatDefenseConnector
{
OdataType = "#microsoft.graph.mobileThreatDefenseConnector",
LastHeartbeatDateTime = DateTimeOffset.Parse("2016-12-31T23:59:37.9174975-08:00"),
PartnerState = MobileThreatPartnerTenantState.Available,
AndroidMobileApplicationManagementEnabled = true,
IosMobileApplicationManagementEnabled = true,
AndroidEnabled = true,
IosEnabled = true,
WindowsEnabled = true,
AndroidDeviceBlockedOnMissingPartnerData = true,
IosDeviceBlockedOnMissingPartnerData = true,
WindowsDeviceBlockedOnMissingPartnerData = true,
PartnerUnsupportedOsVersionBlocked = true,
PartnerUnresponsivenessThresholdInDays = 6,
AllowPartnerToCollectIOSApplicationMetadata = true,
AllowPartnerToCollectIOSPersonalApplicationMetadata = true,
MicrosoftDefenderForEndpointAttachEnabled = true,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.MobileThreatDefenseConnectors.PostAsync(requestBody);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
"time"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewMobileThreatDefenseConnector()
lastHeartbeatDateTime , err := time.Parse(time.RFC3339, "2016-12-31T23:59:37.9174975-08:00")
requestBody.SetLastHeartbeatDateTime(&lastHeartbeatDateTime)
partnerState := graphmodels.AVAILABLE_MOBILETHREATPARTNERTENANTSTATE
requestBody.SetPartnerState(&partnerState)
androidMobileApplicationManagementEnabled := true
requestBody.SetAndroidMobileApplicationManagementEnabled(&androidMobileApplicationManagementEnabled)
iosMobileApplicationManagementEnabled := true
requestBody.SetIosMobileApplicationManagementEnabled(&iosMobileApplicationManagementEnabled)
androidEnabled := true
requestBody.SetAndroidEnabled(&androidEnabled)
iosEnabled := true
requestBody.SetIosEnabled(&iosEnabled)
windowsEnabled := true
requestBody.SetWindowsEnabled(&windowsEnabled)
androidDeviceBlockedOnMissingPartnerData := true
requestBody.SetAndroidDeviceBlockedOnMissingPartnerData(&androidDeviceBlockedOnMissingPartnerData)
iosDeviceBlockedOnMissingPartnerData := true
requestBody.SetIosDeviceBlockedOnMissingPartnerData(&iosDeviceBlockedOnMissingPartnerData)
windowsDeviceBlockedOnMissingPartnerData := true
requestBody.SetWindowsDeviceBlockedOnMissingPartnerData(&windowsDeviceBlockedOnMissingPartnerData)
partnerUnsupportedOsVersionBlocked := true
requestBody.SetPartnerUnsupportedOsVersionBlocked(&partnerUnsupportedOsVersionBlocked)
partnerUnresponsivenessThresholdInDays := int32(6)
requestBody.SetPartnerUnresponsivenessThresholdInDays(&partnerUnresponsivenessThresholdInDays)
allowPartnerToCollectIOSApplicationMetadata := true
requestBody.SetAllowPartnerToCollectIOSApplicationMetadata(&allowPartnerToCollectIOSApplicationMetadata)
allowPartnerToCollectIOSPersonalApplicationMetadata := true
requestBody.SetAllowPartnerToCollectIOSPersonalApplicationMetadata(&allowPartnerToCollectIOSPersonalApplicationMetadata)
microsoftDefenderForEndpointAttachEnabled := true
requestBody.SetMicrosoftDefenderForEndpointAttachEnabled(µsoftDefenderForEndpointAttachEnabled)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
mobileThreatDefenseConnectors, err := graphClient.DeviceManagement().MobileThreatDefenseConnectors().Post(context.Background(), requestBody, nil)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
MobileThreatDefenseConnector mobileThreatDefenseConnector = new MobileThreatDefenseConnector();
mobileThreatDefenseConnector.setOdataType("#microsoft.graph.mobileThreatDefenseConnector");
OffsetDateTime lastHeartbeatDateTime = OffsetDateTime.parse("2016-12-31T23:59:37.9174975-08:00");
mobileThreatDefenseConnector.setLastHeartbeatDateTime(lastHeartbeatDateTime);
mobileThreatDefenseConnector.setPartnerState(MobileThreatPartnerTenantState.Available);
mobileThreatDefenseConnector.setAndroidMobileApplicationManagementEnabled(true);
mobileThreatDefenseConnector.setIosMobileApplicationManagementEnabled(true);
mobileThreatDefenseConnector.setAndroidEnabled(true);
mobileThreatDefenseConnector.setIosEnabled(true);
mobileThreatDefenseConnector.setWindowsEnabled(true);
mobileThreatDefenseConnector.setAndroidDeviceBlockedOnMissingPartnerData(true);
mobileThreatDefenseConnector.setIosDeviceBlockedOnMissingPartnerData(true);
mobileThreatDefenseConnector.setWindowsDeviceBlockedOnMissingPartnerData(true);
mobileThreatDefenseConnector.setPartnerUnsupportedOsVersionBlocked(true);
mobileThreatDefenseConnector.setPartnerUnresponsivenessThresholdInDays(6);
mobileThreatDefenseConnector.setAllowPartnerToCollectIOSApplicationMetadata(true);
mobileThreatDefenseConnector.setAllowPartnerToCollectIOSPersonalApplicationMetadata(true);
mobileThreatDefenseConnector.setMicrosoftDefenderForEndpointAttachEnabled(true);
MobileThreatDefenseConnector result = graphClient.deviceManagement().mobileThreatDefenseConnectors().post(mobileThreatDefenseConnector);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
const options = {
authProvider,
};
const client = Client.init(options);
const mobileThreatDefenseConnector = {
'@odata.type': '#microsoft.graph.mobileThreatDefenseConnector',
lastHeartbeatDateTime: '2016-12-31T23:59:37.9174975-08:00',
partnerState: 'available',
androidMobileApplicationManagementEnabled: true,
iosMobileApplicationManagementEnabled: true,
androidEnabled: true,
iosEnabled: true,
windowsEnabled: true,
androidDeviceBlockedOnMissingPartnerData: true,
iosDeviceBlockedOnMissingPartnerData: true,
windowsDeviceBlockedOnMissingPartnerData: true,
partnerUnsupportedOsVersionBlocked: true,
partnerUnresponsivenessThresholdInDays: 6,
allowPartnerToCollectIOSApplicationMetadata: true,
allowPartnerToCollectIOSPersonalApplicationMetadata: true,
microsoftDefenderForEndpointAttachEnabled: true
};
await client.api('/deviceManagement/mobileThreatDefenseConnectors')
.post(mobileThreatDefenseConnector);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\MobileThreatDefenseConnector;
use Microsoft\Graph\Generated\Models\MobileThreatPartnerTenantState;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new MobileThreatDefenseConnector();
$requestBody->setOdataType('#microsoft.graph.mobileThreatDefenseConnector');
$requestBody->setLastHeartbeatDateTime(new \DateTime('2016-12-31T23:59:37.9174975-08:00'));
$requestBody->setPartnerState(new MobileThreatPartnerTenantState('available'));
$requestBody->setAndroidMobileApplicationManagementEnabled(true);
$requestBody->setIosMobileApplicationManagementEnabled(true);
$requestBody->setAndroidEnabled(true);
$requestBody->setIosEnabled(true);
$requestBody->setWindowsEnabled(true);
$requestBody->setAndroidDeviceBlockedOnMissingPartnerData(true);
$requestBody->setIosDeviceBlockedOnMissingPartnerData(true);
$requestBody->setWindowsDeviceBlockedOnMissingPartnerData(true);
$requestBody->setPartnerUnsupportedOsVersionBlocked(true);
$requestBody->setPartnerUnresponsivenessThresholdInDays(6);
$requestBody->setAllowPartnerToCollectIOSApplicationMetadata(true);
$requestBody->setAllowPartnerToCollectIOSPersonalApplicationMetadata(true);
$requestBody->setMicrosoftDefenderForEndpointAttachEnabled(true);
$result = $graphServiceClient->deviceManagement()->mobileThreatDefenseConnectors()->post($requestBody)->wait();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
Import-Module Microsoft.Graph.DeviceManagement.Administration
$params = @{
"@odata.type" = "#microsoft.graph.mobileThreatDefenseConnector"
lastHeartbeatDateTime = [System.DateTime]::Parse("2016-12-31T23:59:37.9174975-08:00")
partnerState = "available"
androidMobileApplicationManagementEnabled = $true
iosMobileApplicationManagementEnabled = $true
androidEnabled = $true
iosEnabled = $true
windowsEnabled = $true
androidDeviceBlockedOnMissingPartnerData = $true
iosDeviceBlockedOnMissingPartnerData = $true
windowsDeviceBlockedOnMissingPartnerData = $true
partnerUnsupportedOsVersionBlocked = $true
partnerUnresponsivenessThresholdInDays = 6
allowPartnerToCollectIOSApplicationMetadata = $true
allowPartnerToCollectIOSPersonalApplicationMetadata = $true
microsoftDefenderForEndpointAttachEnabled = $true
}
New-MgDeviceManagementMobileThreatDefenseConnector -BodyParameter $params
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.mobile_threat_defense_connector import MobileThreatDefenseConnector
from msgraph.generated.models.mobile_threat_partner_tenant_state import MobileThreatPartnerTenantState
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = MobileThreatDefenseConnector(
odata_type = "#microsoft.graph.mobileThreatDefenseConnector",
last_heartbeat_date_time = "2016-12-31T23:59:37.9174975-08:00",
partner_state = MobileThreatPartnerTenantState.Available,
android_mobile_application_management_enabled = True,
ios_mobile_application_management_enabled = True,
android_enabled = True,
ios_enabled = True,
windows_enabled = True,
android_device_blocked_on_missing_partner_data = True,
ios_device_blocked_on_missing_partner_data = True,
windows_device_blocked_on_missing_partner_data = True,
partner_unsupported_os_version_blocked = True,
partner_unresponsiveness_threshold_in_days = 6,
allow_partner_to_collect_i_o_s_application_metadata = True,
allow_partner_to_collect_i_o_s_personal_application_metadata = True,
microsoft_defender_for_endpoint_attach_enabled = True,
)
result = await graph_client.device_management.mobile_threat_defense_connectors.post(request_body)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
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: 821
{
"@odata.type": "#microsoft.graph.mobileThreatDefenseConnector",
"id": "e4bede14-de14-e4be-14de-bee414debee4",
"lastHeartbeatDateTime": "2016-12-31T23:59:37.9174975-08:00",
"partnerState": "available",
"androidMobileApplicationManagementEnabled": true,
"iosMobileApplicationManagementEnabled": true,
"androidEnabled": true,
"iosEnabled": true,
"windowsEnabled": true,
"androidDeviceBlockedOnMissingPartnerData": true,
"iosDeviceBlockedOnMissingPartnerData": true,
"windowsDeviceBlockedOnMissingPartnerData": true,
"partnerUnsupportedOsVersionBlocked": true,
"partnerUnresponsivenessThresholdInDays": 6,
"allowPartnerToCollectIOSApplicationMetadata": true,
"allowPartnerToCollectIOSPersonalApplicationMetadata": true,
"microsoftDefenderForEndpointAttachEnabled": true
}