ライフサイクルの更新ManagementSettings
[アーティクル]
07/04/2024
5 人の共同作成者
フィードバック
この記事の内容
名前空間: microsoft.graph.identityGovernance
lifecycleManagementSettings オブジェクトのプロパティを更新します。
この API は、次の国内クラウド展開 で使用できます。
グローバル サービス
米国政府機関 L4
米国政府機関 L5 (DOD)
21Vianet が運営する中国
✅
✅
✅
❌
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。
アプリで必要な場合にのみ 、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「アクセス許可の種類 」を参照してください。 これらのアクセス許可の詳細については、「アクセス許可のリファレンス 」を参照してください。
アクセス許可の種類
最小特権アクセス許可
より高い特権のアクセス許可
委任 (職場または学校のアカウント)
LifecycleWorkflows.ReadWrite.All
注意事項なし。
委任 (個人用 Microsoft アカウント)
サポートされていません。
サポートされていません。
アプリケーション
LifecycleWorkflows.ReadWrite.All
注意事項なし。
委任されたシナリオの場合、管理者には少なくとも ライフサイクル ワークフロー管理者 Microsoft Entra ロールが必要です 。
HTTP 要求
PATCH /identityGovernance/lifecycleWorkflows/settings
名前
説明
Authorization
ベアラー {token}。 必須です。
認証と認可 についての詳細をご覧ください。
Content-Type
application/json. 必須です。
要求本文
要求本文で、更新すべきプロパティの値のみ を指定します。 要求本文に含まれていない既存のプロパティは、以前の値を維持するか、他のプロパティ値の変更に基づいて再計算されます。
次の表に、更新できるプロパティを示します。
プロパティ
種類
説明
workflowScheduleIntervalInHours
Int32
ワークフロー スケジュール間隔。 必須です。
emailSettings
microsoft.graph.emailSettings
ワークフロー内の電子メール固有のタスクから送信されるメールの設定。 必須。
応答
成功した場合、このアクションは 204 No Content
応答コードを返します。
例
要求
次の例は要求を示しています。
PATCH https://graph.microsoft.com/v1.0/identityGovernance/lifecycleWorkflows/settings
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#identityGovernance/lifecycleWorkflows/settings/$entity",
"workflowScheduleIntervalInHours": 3,
"emailSettings": {
"senderDomain": "ContosoIndustries.net",
"useCompanyBranding": true
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models.IdentityGovernance;
using Microsoft.Graph.Models;
var requestBody = new LifecycleManagementSettings
{
WorkflowScheduleIntervalInHours = 3,
EmailSettings = new EmailSettings
{
SenderDomain = "ContosoIndustries.net",
UseCompanyBranding = true,
},
AdditionalData = new Dictionary<string, object>
{
{
"@odata.context" , "https://graph.microsoft.com/v1.0/$metadata#identityGovernance/lifecycleWorkflows/settings/$entity"
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.IdentityGovernance.LifecycleWorkflows.Settings.PatchAsync(requestBody);
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
mgc identity-governance lifecycle-workflows settings patch --body '{\
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#identityGovernance/lifecycleWorkflows/settings/$entity",\
"workflowScheduleIntervalInHours": 3,\
"emailSettings": {\
"senderDomain": "ContosoIndustries.net",\
"useCompanyBranding": true\
}\
}\
'
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodelsidentitygovernance "github.com/microsoftgraph/msgraph-sdk-go/models/identitygovernance"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodelsidentitygovernance.NewLifecycleManagementSettings()
workflowScheduleIntervalInHours := int32(3)
requestBody.SetWorkflowScheduleIntervalInHours(&workflowScheduleIntervalInHours)
emailSettings := graphmodels.NewEmailSettings()
senderDomain := "ContosoIndustries.net"
emailSettings.SetSenderDomain(&senderDomain)
useCompanyBranding := true
emailSettings.SetUseCompanyBranding(&useCompanyBranding)
requestBody.SetEmailSettings(emailSettings)
additionalData := map[string]interface{}{
"@odata.context" : "https://graph.microsoft.com/v1.0/$metadata#identityGovernance/lifecycleWorkflows/settings/$entity",
}
requestBody.SetAdditionalData(additionalData)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
settings, err := graphClient.IdentityGovernance().LifecycleWorkflows().Settings().Patch(context.Background(), requestBody, nil)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.models.identitygovernance.LifecycleManagementSettings lifecycleManagementSettings = new com.microsoft.graph.models.identitygovernance.LifecycleManagementSettings();
lifecycleManagementSettings.setWorkflowScheduleIntervalInHours(3);
EmailSettings emailSettings = new EmailSettings();
emailSettings.setSenderDomain("ContosoIndustries.net");
emailSettings.setUseCompanyBranding(true);
lifecycleManagementSettings.setEmailSettings(emailSettings);
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("@odata.context", "https://graph.microsoft.com/v1.0/$metadata#identityGovernance/lifecycleWorkflows/settings/$entity");
lifecycleManagementSettings.setAdditionalData(additionalData);
com.microsoft.graph.models.identitygovernance.LifecycleManagementSettings result = graphClient.identityGovernance().lifecycleWorkflows().settings().patch(lifecycleManagementSettings);
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
const lifecycleManagementSettings = {
'@odata.context': 'https://graph.microsoft.com/v1.0/$metadata#identityGovernance/lifecycleWorkflows/settings/$entity',
workflowScheduleIntervalInHours: 3,
emailSettings: {
senderDomain: 'ContosoIndustries.net',
useCompanyBranding: true
}
};
await client.api('/identityGovernance/lifecycleWorkflows/settings')
.update(lifecycleManagementSettings);
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\IdentityGovernance\LifecycleManagementSettings;
use Microsoft\Graph\Generated\Models\EmailSettings;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new LifecycleManagementSettings();
$requestBody->setWorkflowScheduleIntervalInHours(3);
$emailSettings = new EmailSettings();
$emailSettings->setSenderDomain('ContosoIndustries.net');
$emailSettings->setUseCompanyBranding(true);
$requestBody->setEmailSettings($emailSettings);
$additionalData = [
'@odata.context' => 'https://graph.microsoft.com/v1.0/$metadata#identityGovernance/lifecycleWorkflows/settings/$entity',
];
$requestBody->setAdditionalData($additionalData);
$result = $graphServiceClient->identityGovernance()->lifecycleWorkflows()->settings()->patch($requestBody)->wait();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
Import-Module Microsoft.Graph.Identity.Governance
$params = @{
"@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#identityGovernance/lifecycleWorkflows/settings/$entity"
workflowScheduleIntervalInHours = 3
emailSettings = @{
senderDomain = "ContosoIndustries.net"
useCompanyBranding = $true
}
}
Update-MgIdentityGovernanceLifecycleWorkflowSetting -BodyParameter $params
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
from msgraph import GraphServiceClient
from msgraph.generated.models.identity_governance.lifecycle_management_settings import LifecycleManagementSettings
from msgraph.generated.models.email_settings import EmailSettings
graph_client = GraphServiceClient(credentials, scopes)
request_body = LifecycleManagementSettings(
workflow_schedule_interval_in_hours = 3,
email_settings = EmailSettings(
sender_domain = "ContosoIndustries.net",
use_company_branding = True,
),
additional_data = {
"@odata_context" : "https://graph.microsoft.com/v1.0/$metadata#identityGovernance/lifecycleWorkflows/settings/$entity",
}
)
result = await graph_client.identity_governance.lifecycle_workflows.settings.patch(request_body)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
応答
HTTP/1.1 204 No Content