获取 userFlowLanguagePage
本文内容
命名空间:microsoft.graph
读取用户流中某一语言的 userFlowLanguagePage 对象中的值。 这些值在用户流定义的用户旅程中向用户显示。
权限
要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限 。
权限类型
权限(从最低特权到最高特权)
委派(工作或学校帐户)
IdentityUserFlow.Read.All、IdentityUserFlow.ReadWrite.All
委派(个人 Microsoft 帐户)
不支持。
应用程序
IdentityUserFlow.Read.All、IdentityUserFlow.ReadWrite.All
工作或学校帐户需要属于以下角色之一:
HTTP 请求
若要引用对象中的内容,必须使用 $value 。 这将返回 对象中的内容,并允许你直接引用它。
GET /identity/b2xUserFlows/{id}/languages/{id}/defaultPages/{id}/$value
GET /identity/b2xUserFlows/{id}/languages/{id}/overridesPages/{id}/$value
名称
说明
Authorization
Bearer {token}。必需。
请求正文
请勿提供此方法的请求正文。
响应
如果成功,此方法在响应 200 OK 正文中返回 响应代码和 userFlowLanguagePage 对象。
示例
请求
下面展示了示例请求。
GET https://graph.microsoft.com/v1.0/identity/b2xUserFlows/B2X_1_Partner/languages/en/defaultPages/idpselections/$value
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var stream = await graphClient.Identity.B2xUserFlows["{b2xIdentityUserFlow-id}"].Languages["{userFlowLanguageConfiguration-id}"].DefaultPages["{userFlowLanguagePage-id}"].Content
.Request()
.GetAsync();
有关如何将 SDK 添加 到项目并 创建 authProvider 实例的 详细信息,请参阅 SDK 文档 。
const options = {
authProvider,
};
const client = Client.init(options);
let stream = await client.api('/identity/b2xUserFlows/B2X_1_Partner/languages/en/defaultPages/idpselections/$value')
.get();
有关如何将 SDK 添加 到项目并 创建 authProvider 实例的 详细信息,请参阅 SDK 文档 。
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/identity/b2xUserFlows/B2X_1_Partner/languages/en/defaultPages/idpselections/$value"]]];
[urlRequest setHTTPMethod:@"GET"];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
MSGraphStream *stream = [[MSGraphStream alloc] initWithData:data error:&nserror];
}];
[meDataTask execute];
有关如何将 SDK 添加 到项目并 创建 authProvider 实例的 详细信息,请参阅 SDK 文档 。
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
InputStream stream = graphClient.identity().b2xUserFlows("B2X_1_Partner").languages("en").defaultPages("idpselections").content()
.buildRequest()
.get();
有关如何将 SDK 添加 到项目并 创建 authProvider 实例的 详细信息,请参阅 SDK 文档 。
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
b2xIdentityUserFlowId := "b2xIdentityUserFlow-id"
userFlowLanguageConfigurationId := "userFlowLanguageConfiguration-id"
userFlowLanguagePageId := "userFlowLanguagePage-id"
graphClient.Identity().B2xUserFlowsById(&b2xIdentityUserFlowId).LanguagesById(&userFlowLanguageConfigurationId).DefaultPagesById(&userFlowLanguagePageId).$value().Get()
有关如何将 SDK 添加 到项目并 创建 authProvider 实例的 详细信息,请参阅 SDK 文档 。
响应
下面展示了示例响应。
注意: 为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 200 OK
Content-Type: application/json
{
"LocalizedStrings": [
{
"ElementType": "ErrorMessage",
"ElementId": null,
"StringId": "ServiceThrottled",
"Override": false,
"Value": "There are too many requests at this moment. Please wait for some time and try again."
}
]
}