Azure AD B2C强制密码重置提示语本地化方法咨询
本地化Azure AD B2C强制密码重置消息的配置方法
核心配置要点
- 要本地化的
userMsg是输出声明,对应本地化配置的ElementType为ClaimType,StringId就是声明ID:userMsg - 该消息属于登录页(SelfAsserted)的资源,需添加到对应语言的
api.selfasserted.*本地化资源中(而非你当前配置的api.localaccountsignup.*,后者是注册页专属资源)
具体配置示例
1. 英文本地化条目(api.selfasserted.en)
<LocalizedResources Id="api.selfasserted.en"> <LocalizedStrings> <!-- 保留现有配置,新增以下条目 --> <LocalizedString ElementType="ClaimType" StringId="userMsg">Your password has expired, please change to a new password.</LocalizedString> </LocalizedStrings> </LocalizedResources>
2. 西班牙文本地化条目(api.selfasserted.es)
<LocalizedResources Id="api.selfasserted.es"> <LocalizedStrings> <!-- 保留现有配置,新增以下条目 --> <LocalizedString ElementType="ClaimType" StringId="userMsg">Su contraseña ha expirado, por favor cambie a una nueva contraseña.</LocalizedString> </LocalizedStrings> </LocalizedResources>
验证配置有效性
确保使用userMsg的技术配置文件(SelfAsserted-LocalAccountSignin-Email)已启用本地化:
<TechnicalProfile Id="SelfAsserted-LocalAccountSignin-Email"> <Localization Enabled="true" /> <!-- 确认引用的本地化资源ID与上述配置匹配 --> <LocalizedResourcesReferenceId>api.selfasserted</LocalizedResourcesReferenceId> <!-- 其他原有配置... --> </TechnicalProfile>
内容的提问来源于stack exchange,提问作者Jeff Nikelson
相关产品推荐
相关产品推荐

