创建自定义TaskExtensions

命名空间:microsoft.graph.identityGovernance

重要

Microsoft Graph 中版本下的 /beta API 可能会更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 在 v1.0 中是否可用,请使用 版本 选择器。

创建新的 customTaskExtension 对象。

权限

调用此 API 需要以下权限之一。 若要了解详细信息,包括如何选择权限的信息,请参阅权限

权限类型 权限(从最低特权到最高特权)
委派(工作或学校帐户) LifecycleWorkflows.ReadWrite.All
委派(个人 Microsoft 帐户) 不支持
应用 不支持

重要

调用用户还需要指定 Azure 逻辑应用的以下 Azure 资源管理器角色之一:逻辑应用参与者参与者所有者

对于委派方案,管理员需要 生命周期工作流管理员Azure AD 角色

HTTP 请求

POST /identityGovernance/lifecycleWorkflows/customTaskExtensions

请求标头

名称 说明
Authorization 持有者 {token}。 必填。
Content-Type application/json. 必需。

请求正文

在请求正文中,提供 customTaskExtension 对象的 JSON 表示形式。

在创建自定义 TaskExtension 时,可以指定以下属性。

属性 类型 说明
authenticationConfiguration microsoft.graph.customExtensionAuthenticationConfiguration customTaskExtension身份验证配置。
clientConfiguration microsoft.graph.customExtensionClientConfiguration 自定义扩展的客户端配置。
说明 String 的说明 customTaskExtension
displayName String 标识 的唯一 customTaskExtension字符串。
endpointConfiguration microsoft.graph.customExtensionEndpointConfiguration 自定义扩展的终结点配置。 可选。
callbackConfiguration microsoft.graph.identityGovernance.customTaskExtensionCallbackConfiguration 自定义扩展的回调配置。 可选。

响应

如果成功,此方法在 201 Created 响应正文中返回响应代码和 microsoft.graph.identityGovernance.customTaskExtension 对象。

示例

请求

请求示例如下所示。

POST https://graph.microsoft.com/beta/identityGovernance/lifecycleWorkflows/customTaskExtensions
Content-Type: application/json
Content-length: 588

{
    "displayName": "Grant manager access to mailbox and OneDrive",
    "description": "Grant manager access to mailbox and OneDrive",
    "endpointConfiguration": {
        "@odata.type": "#microsoft.graph.logicAppTriggerEndpointConfiguration",
        "subscriptionId": "c500b67c-e9b7-4ad2-a90d-77d41385ae55",
        "resourceGroupName": "RG-LCM",
        "logicAppWorkflowName": "ManagerAccess"
    },
    "authenticationConfiguration": {
        "@odata.type": "#microsoft.graph.azureAdTokenAuthentication",
        "resourceId": "542dc01a-0b5d-4edc-b3f9-5cfe6393f557"
    },
    "clientConfiguration": {
        "@odata.type": "#microsoft.graph.customExtensionClientConfiguration",
        "maximumRetries": 1,
        "timeoutInMilliseconds": 1000
    },
    "callbackConfiguration": {
        "@odata.type": "#microsoft.graph.identityGovernance.customTaskExtensionCallbackConfiguration",
        "timeoutDuration": "PT5M"
    }
}

响应

下面是响应的示例

注意:为了提高可读性,可能缩短了此处显示的响应对象。

HTTP/1.1 201 Created
Content-Type: application/json

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#identityGovernance/lifecycleWorkflows/customTaskExtensions/$entity",
    "id": "ee2590e4-4572-4820-a397-969ecd7bd6a9",
    "displayName": "Grant manager access to mailbox and OneDrive",
    "description": "Grant manager access to mailbox and OneDrive",
    "createdDateTime": "2022-08-24T22:37:46.1790566Z",
    "lastModifiedDateTime": "2022-08-24T22:37:46.179062Z",
    "endpointConfiguration": {
        "@odata.type": "#microsoft.graph.logicAppTriggerEndpointConfiguration",
        "subscriptionId": "c500b67c-e9b7-4ad2-a90d-77d41385ae55",
        "resourceGroupName": "RG-LCM",
        "logicAppWorkflowName": "ManagerAccess"
    },
    "authenticationConfiguration": {
        "@odata.type": "#microsoft.graph.azureAdTokenAuthentication",
        "resourceId": "542dc01a-0b5d-4edc-b3f9-5cfe6393f557"
    },
    "clientConfiguration": {
        "@odata.type": "#microsoft.graph.customExtensionClientConfiguration",
        "maximumRetries": 1,
        "timeoutInMilliseconds": 1000
    },
    "callbackConfiguration": {
        "@odata.type": "#microsoft.graph.identityGovernance.customTaskExtensionCallbackConfiguration",
        "timeoutDuration": "PT5M"
    }
}