Update telecomExpenseManagementPartner
Article
11/30/2023
11 contributors
Feedback
In this article
Namespace: microsoft.graph
Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.
Update the properties of a telecomExpenseManagementPartner 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
Delegated (personal Microsoft account)
Not supported.
Application
DeviceManagementServiceConfig.ReadWrite.All
HTTP Request
PATCH /deviceManagement/telecomExpenseManagementPartners/{telecomExpenseManagementPartnerId}
Request body
In the request body, supply a JSON representation for the telecomExpenseManagementPartner object.
The following table shows the properties that are required when you create the telecomExpenseManagementPartner .
Property
Type
Description
id
String
Unique identifier of the TEM partner.
displayName
String
Display name of the TEM partner.
url
String
URL of the TEM partner's administrative control panel, where an administrator can configure their TEM service.
appAuthorized
Boolean
Whether the partner's AAD app has been authorized to access Intune.
enabled
Boolean
Whether Intune's connection to the TEM service is currently enabled or disabled.
lastConnectionDateTime
DateTimeOffset
Timestamp of the last request sent to Intune by the TEM partner.
Response
If successful, this method returns a 200 OK
response code and an updated telecomExpenseManagementPartner object in the response body.
Example
Request
Here is an example of the request.
PATCH https://graph.microsoft.com/v1.0/deviceManagement/telecomExpenseManagementPartners/{telecomExpenseManagementPartnerId}
Content-type: application/json
Content-length: 248
{
"@odata.type": "#microsoft.graph.telecomExpenseManagementPartner",
"displayName": "Display Name value",
"url": "Url value",
"appAuthorized": true,
"enabled": true,
"lastConnectionDateTime": "2016-12-31T23:58:36.6670033-08:00"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new TelecomExpenseManagementPartner
{
OdataType = "#microsoft.graph.telecomExpenseManagementPartner",
DisplayName = "Display Name value",
Url = "Url value",
AppAuthorized = true,
Enabled = true,
LastConnectionDateTime = DateTimeOffset.Parse("2016-12-31T23:58:36.6670033-08:00"),
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.TelecomExpenseManagementPartners["{telecomExpenseManagementPartner-id}"].PatchAsync(requestBody);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc device-management telecom-expense-management-partners patch --telecom-expense-management-partner-id {telecomExpenseManagementPartner-id} --body '{\
"@odata.type": "#microsoft.graph.telecomExpenseManagementPartner",\
"displayName": "Display Name value",\
"url": "Url value",\
"appAuthorized": true,\
"enabled": true,\
"lastConnectionDateTime": "2016-12-31T23:58:36.6670033-08:00"\
}\
'
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
import (
"context"
"time"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestBody := graphmodels.NewTelecomExpenseManagementPartner()
displayName := "Display Name value"
requestBody.SetDisplayName(&displayName)
url := "Url value"
requestBody.SetUrl(&url)
appAuthorized := true
requestBody.SetAppAuthorized(&appAuthorized)
enabled := true
requestBody.SetEnabled(&enabled)
lastConnectionDateTime , err := time.Parse(time.RFC3339, "2016-12-31T23:58:36.6670033-08:00")
requestBody.SetLastConnectionDateTime(&lastConnectionDateTime)
telecomExpenseManagementPartners, err := graphClient.DeviceManagement().TelecomExpenseManagementPartners().ByTelecomExpenseManagementPartnerId("telecomExpenseManagementPartner-id").Patch(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);
TelecomExpenseManagementPartner telecomExpenseManagementPartner = new TelecomExpenseManagementPartner();
telecomExpenseManagementPartner.setOdataType("#microsoft.graph.telecomExpenseManagementPartner");
telecomExpenseManagementPartner.setDisplayName("Display Name value");
telecomExpenseManagementPartner.setUrl("Url value");
telecomExpenseManagementPartner.setAppAuthorized(true);
telecomExpenseManagementPartner.setEnabled(true);
OffsetDateTime lastConnectionDateTime = OffsetDateTime.parse("2016-12-31T23:58:36.6670033-08:00");
telecomExpenseManagementPartner.setLastConnectionDateTime(lastConnectionDateTime);
TelecomExpenseManagementPartner result = graphClient.deviceManagement().telecomExpenseManagementPartners().byTelecomExpenseManagementPartnerId("{telecomExpenseManagementPartner-id}").patch(telecomExpenseManagementPartner);
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 telecomExpenseManagementPartner = {
'@odata.type': '#microsoft.graph.telecomExpenseManagementPartner',
displayName: 'Display Name value',
url: 'Url value',
appAuthorized: true,
enabled: true,
lastConnectionDateTime: '2016-12-31T23:58:36.6670033-08:00'
};
await client.api('/deviceManagement/telecomExpenseManagementPartners/{telecomExpenseManagementPartnerId}')
.update(telecomExpenseManagementPartner);
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\TelecomExpenseManagementPartner;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new TelecomExpenseManagementPartner();
$requestBody->setOdataType('#microsoft.graph.telecomExpenseManagementPartner');
$requestBody->setDisplayName('Display Name value');
$requestBody->setUrl('Url value');
$requestBody->setAppAuthorized(true);
$requestBody->setEnabled(true);
$requestBody->setLastConnectionDateTime(new \DateTime('2016-12-31T23:58:36.6670033-08:00'));
$result = $graphServiceClient->deviceManagement()->telecomExpenseManagementPartners()->byTelecomExpenseManagementPartnerId('telecomExpenseManagementPartner-id')->patch($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.telecomExpenseManagementPartner"
displayName = "Display Name value"
url = "Url value"
appAuthorized = $true
enabled = $true
lastConnectionDateTime = [System.DateTime]::Parse("2016-12-31T23:58:36.6670033-08:00")
}
Update-MgDeviceManagementTelecomExpenseManagementPartner -TelecomExpenseManagementPartnerId $telecomExpenseManagementPartnerId -BodyParameter $params
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
from msgraph import GraphServiceClient
from msgraph.generated.models.telecom_expense_management_partner import TelecomExpenseManagementPartner
graph_client = GraphServiceClient(credentials, scopes)
request_body = TelecomExpenseManagementPartner(
odata_type = "#microsoft.graph.telecomExpenseManagementPartner",
display_name = "Display Name value",
url = "Url value",
app_authorized = True,
enabled = True,
last_connection_date_time = "2016-12-31T23:58:36.6670033-08:00",
)
result = await graph_client.device_management.telecom_expense_management_partners.by_telecom_expense_management_partner_id('telecomExpenseManagementPartner-id').patch(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 200 OK
Content-Type: application/json
Content-Length: 297
{
"@odata.type": "#microsoft.graph.telecomExpenseManagementPartner",
"id": "47a3b399-b399-47a3-99b3-a34799b3a347",
"displayName": "Display Name value",
"url": "Url value",
"appAuthorized": true,
"enabled": true,
"lastConnectionDateTime": "2016-12-31T23:58:36.6670033-08:00"
}