我已使用自定义策略配置了Azure AD B2C,但无法使用在Azure门户中创建的新用户进行身份验证。用户有一个临时密码。Azure AD B2C返回错误文本Invalid username or password,即使用户名和密码正确。
我已经确认可以使用非自定义策略在Azure AD B2C中使用新用户和临时密码登录。登录后,系统会提示用户更改其密码。
可以使用本指南中描述的自定义策略重现该问题:Get started with custom policies。
更多信息:
我已经在UserJourneyRecorderEndpoint中配置了b2crecorder https://b2crecorder.azurewebsites.net/stream?id=<guid>
。这使您可以通过https://b2crecorder.azurewebsites.net/trace_102.html?id=<guid>
访问更多信息
该问题会导致以下日志记录:
SelfAssertedMessageValidationHandler
The message was received from null
Validation via SelfAssertedAttributeProvider
Additional validation is required...
OperativeTechnicalProfile is login-NonInteractive
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'
Mapping default value 'undefined' to policy 'client_id'
Mapping default value 'undefined' to policy 'resource_id'
Using validation endpoint at: https://login.microsoftonline.com/xxxx.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(d56987e9-be2e-46fc-a7a4-23e317f8f174) Message Detail
ValidationRequest:
ValidationResponse:
Exception:
Exception of type 'Web.TPEngine.Providers.BadArgumentRetryNeededException' was thrown.
发布于 2017-07-29 06:05:11
出现这种情况的最常见原因是Grant Permissions尚未执行。
在"ProxyIdentityExperienceFramework ->“应用程序上,选中Access IdentityExperienceFramework ->的复选框,单击”选择“并单击”完成“,您还必须完成下一步:
选择Grant Permissions,然后通过选择Yes进行确认。
编辑:
很抱歉,在仔细阅读您的情况后,“注册或登录策略”或“自定义策略”都不支持Azure Active Directory forceChangePasswordNextLogin
标志。(forceChangePasswordNextLogin
只适用于“注册策略”)有一个feature request tracking this here.
发布于 2020-01-04 00:31:07
由于这是第一篇弹出这个问题的SO文章,我会补充说,当遇到这个问题时,另一个检查的可能性是,确保代理应用程序类型是Native,而不是Web。
https://stackoverflow.com/questions/45375169
复制相似问题