创建 authenticationListener
命名空间:microsoft.graph
重要
Microsoft Graph版本下的 /beta API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。
为 onSignUpStart 事件创建新的 authenticationListener 对象。
Permissions
要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限。
| 权限类型 | 权限(从最低特权到最高特权) |
|---|---|
| 委派(工作或学校帐户) | Policy.ReadWrite.ApplicationConfiguration |
| 委派(个人 Microsoft 帐户) | 不支持。 |
| Application | Policy.ReadWrite.ApplicationConfiguration |
HTTP 请求
POST /identity/events/onSignupStart
请求标头
| 名称 | 说明 |
|---|---|
| Authorization | Bearer {token}。必需。 |
| Content-Type | application/json. Required. |
请求正文
在请求正文中,提供 authenticationListener 对象的 JSON 表示形式。
下表显示创建 invokeUserFlowListener authenticationListener 时所需的属性。
| 属性 | 类型 | 说明 |
|---|---|---|
| priority | Int32 | 侦听器的优先级。 确定事件具有多个侦听器时的评估顺序。 优先级从低到高计算。 |
| sourceFilter | authenticationSourceFilter | 基于用于确定是否评估侦听器的身份验证源的筛选器。 这目前仅限于基于用户进行身份验证的应用程序的评估。 |
| userFlow | b2xIdentityUserFlow | 计算此操作时将调用的 b2xIdentityUserFlow 对象。 |
响应
如果成功,此方法在响应正文中返回响应代码和 201 Created authenticationListener 对象。
示例
请求
下面展示了示例请求。
POST https://graph.microsoft.com/beta/identity/events/onSignupStart
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.invokeUserFlowListener",
"priority": 101,
"sourceFilter": {
"includeApplications": [
"1fc41a76-3050-4529-8095-9af8897cf63d"
]
},
"userFlow": {
"id": "B2X_1_Partner"
}
}
响应
下面展示了示例响应。
注意: 为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 201 Created
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#identity/events/onSignupStart/Microsoft.Graph.InvokeUserFlowListener/$entity",
"@odata.type": "#microsoft.graph.invokeUserFlowListener",
"id": "2be3336b-e3b4-44f3-9128-b6fd9ad39bb8",
"priority": 101,
"sourceFilter": {
"includeApplications": [
"1fc41a76-3050-4529-8095-9af8897cf63d"
]
}
}
反馈
提交和查看相关反馈