Azure AD B2C:自定义策略本地帐户登录/注册失败

时间:2017-11-22 13:13:54

标签: azure-ad-b2c

我尝试使用自定义政策构建邀请流。

我的方法是将WingTipGamesB2C policies的邀请部分与custom policy starter pack合并。

邀请似乎工作正常;使用邀请链接并提供用户数据(显示名称,密码)时,将在Azure AD中创建用户。

但我无法使用此用户登录;登录对话框显示“用户名或密码无效”。 (密码错误时显示“密码不正确”)。

使用内置登录策略,登录按预期工作。

b2crecorder显示以下日志:

data = connection.recv(16)
data_i = socket.ntohl(data)

这看起来与this question中的错误相同,但应该是一个不同的问题,因为问题是那里的“forceChangePasswordNextLogin”标志,而邀请创建的用户不应该有这个标志

我检查了SelfAssertedMessageValidationHandler The message was received from null Validation via SelfAssertedAttributeProvider Additional validation is required... OperativeTechnicalProfile is login-NonInteractive Mapping default value 'undefined' to policy 'client_id' Mapping default value 'undefined' to policy 'resource_id' Mapping 'username' partner claim type to 'signInName' policy claim type Mapping default value 'undefined' to policy 'grant_type' Mapping default value 'undefined' to policy 'scope' Mapping default value 'undefined' to policy 'nca' Using validation endpoint at: https://login.microsoftonline.com/foo.onmicrosoft.com/oauth2/token Orchestration Step: 1 RA: 0 Protocol selected by the caller: OAUTH2 Communications with the caller handled by: OAuth2ProtocolProvider IC: True OAuth2 Message: MSG(c693a69c-4a15-4ef5-b85d-a9a6a3f3298f) Message Detail ValidationRequest: ValidationResponse: Exception: Exception of type 'Web.TPEngine.Providers.BadArgumentRetryNeededException' was thrown. IdentityExperienceFramework个应用是否已正确创建并授予了权限。它们也被引用,如ProxyIdentityExperienceFramework中所述。

我该如何解决这个问题?我该怎么做才能进一步调试这个问题?我使用了Application Insights和b2crecorder,却没有获得有关失败的足够信息。

其他信息:
*自定义注册也不起作用 *通过第三方IDP(Google)注册/进入

1 个答案:

答案 0 :(得分:0)

我刚刚发现了我的问题;在login-NonInteractive技术配置文件中,我用一些漂亮的名字替换了看起来很奇怪的<Item Key="ProviderName">https://sts.windows.net/</Item>,假设它只是一些不相关的字符串(例如对于Google IdP,我可以使用<Item Key="ProviderName">Google</Item>。 ..)

嗯,这似乎很重要。恢复原始提供者名称时,登录功能完美。

在这里回答我自己的问题,因为我希望这会节省别人的时间。