更新 b2cIdentityUserFlow
命名空间:microsoft.graph
更新 b2cIdentityUserFlow 对象 的属性。
Permissions
要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限。
| 权限类型 |
权限(从最低特权到最高特权) |
| 委派(工作或学校帐户) |
IdentityUserFlow.ReadWrite.All |
| 委派(个人 Microsoft 帐户) |
不支持。 |
| 应用程序 |
IdentityUserFlow.ReadWrite.All |
工作或学校帐户需要属于以下角色之一:
HTTP 请求
PATCH /identity/b2cUserFlows/{id}
| 名称 |
说明 |
| Authorization |
Bearer {token}。必需。 |
| Content-Type |
application/json. Required. |
请求正文
在请求正文中,提供 b2cIdentityUserFlow 对象的 JSON 表示形式。
下表显示创建 b2cIdentityUserFlow后可以更新的属性。
| 属性 |
类型 |
说明 |
| isLanguageCustomizationEnabled |
Boolean |
此属性决定语言自定义是否在 B2C 用户流中启用。 默认情况下,语言自定义不会在 B2C 用户流中启用。 |
| defaultLanguageTag |
String |
指示在请求中没有指定 ui_locale 标签时使用的 b2cIdentityUserFlow 的默认语言。 此字段符合 RFC 5646。 |
响应
如果成功,此方法在响应正文中返回 响应代码和更新的 200 OK b2cIdentityUserFlow 对象。
示例
请求
下面展示了示例请求。
PATCH https://graph.microsoft.com/beta/identity/b2cUserFlows/B2C_1_CustomerSignUp
Content-Type: application/json
{
"isLanguageCustomizationEnabled": true,
"defaultLanguageTag": "en",
}
const options = {
authProvider,
};
const client = Client.init(options);
const b2cIdentityUserFlow = {
isLanguageCustomizationEnabled: true,
defaultLanguageTag: 'en',
};
await client.api('/identity/b2cUserFlows/B2C_1_CustomerSignUp')
.version('beta')
.update(b2cIdentityUserFlow);
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/identity/b2cUserFlows/B2C_1_CustomerSignUp"]]];
[urlRequest setHTTPMethod:@"PATCH"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphB2cIdentityUserFlow *b2cIdentityUserFlow = [[MSGraphB2cIdentityUserFlow alloc] init];
[b2cIdentityUserFlow setIsLanguageCustomizationEnabled: true];
[b2cIdentityUserFlow setDefaultLanguageTag:@"en"];
NSError *error;
NSData *b2cIdentityUserFlowData = [b2cIdentityUserFlow getSerializedDataWithError:&error];
[urlRequest setHTTPBody:b2cIdentityUserFlowData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var b2cIdentityUserFlow = new B2cIdentityUserFlow
{
IsLanguageCustomizationEnabled = true,
DefaultLanguageTag = "en"
};
await graphClient.Identity.B2cUserFlows["{b2cIdentityUserFlow-id}"]
.Request()
.UpdateAsync(b2cIdentityUserFlow);
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
B2cIdentityUserFlow b2cIdentityUserFlow = new B2cIdentityUserFlow();
b2cIdentityUserFlow.isLanguageCustomizationEnabled = true;
b2cIdentityUserFlow.defaultLanguageTag = "en";
graphClient.identity().b2cUserFlows("B2C_1_CustomerSignUp")
.buildRequest()
.patch(b2cIdentityUserFlow);
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewB2cIdentityUserFlow()
isLanguageCustomizationEnabled := true
requestBody.SetIsLanguageCustomizationEnabled(&isLanguageCustomizationEnabled)
defaultLanguageTag := "en"
requestBody.SetDefaultLanguageTag(&defaultLanguageTag)
b2cIdentityUserFlowId := "b2cIdentityUserFlow-id"
graphClient.Identity().B2cUserFlowsById(&b2cIdentityUserFlowId).Patch(requestBody)
响应
下面展示了示例响应。
注意: 为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 204 No Content