我可以在 Azure AD B2C 中禁用注册吗?
Can I disable sign-up in Azure AD B2C?
我可以在 Azure AD B2C 中禁用注册吗?换句话说,我不希望客户自己注册帐户,我希望它只由 Azure 中的管理员完成。谢谢。
内置策略
是的,只定义一个Sign-in policy。
不定义 Sign-up or Sign-in policy nor a Sign-up policy.
自定义策略
仅登录策略的问题是您只有基本的 UI 自定义选项。您没有获得 here.
中描述的全套功能
使用自定义策略,您可以定义 Sign-Up/Sign-In 策略,然后禁用注册部分。如果 UI 定制如 here.
所述,这允许相同的级别
- 通过CSS
隐藏注册link
- 从您的技术资料中删除
<Item Key="SignUpTarget">SignUpWithLogonUsernameExchange</Item>
<TechnicalProfile Id="SelfAsserted-LocalAccountSignin-Username-NoSignUp">
<DisplayName>Local Account Signin</DisplayName>
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Metadata>
<!-- Want to disable sign-up on unified policy -->
<!-- <Item Key="SignUpTarget">SignUpWithLogonUsernameExchange</Item> -->
<Item Key="setting.operatingMode">Username</Item>
<Item Key="ContentDefinitionReferenceId">api.selfasserted-ext-local</Item>
<Item Key="language.button_continue">Login</Item>
</Metadata>
...
</TechnicalProfile>
在内置策略(又名用户流)中,您可以选择仅登录策略。
在自定义策略中,您可以使用下面代码段中显示的元数据属性,无需定义任何自定义 css。
<TechnicalProfile Id="SelfAsserted-LocalAccountSignin-Email">
<DisplayName>Local Account Signin</DisplayName>
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Metadata>
<!-- Clear SignUpTarget for security reasons -->
<Item Key="SignUpTarget"></Item>
<Item Key="setting.operatingMode">Email</Item>
<Item Key="ContentDefinitionReferenceId">api.selfasserted</Item>
<!-- Remove signup and forgot password links -->
<Item Key="setting.showSignupLink">false</Item>
<Item Key="setting.forgotPasswordLinkLocation">None</Item>
</Metadata>
...
</TechnicalProfile>
我可以在 Azure AD B2C 中禁用注册吗?换句话说,我不希望客户自己注册帐户,我希望它只由 Azure 中的管理员完成。谢谢。
内置策略
是的,只定义一个Sign-in policy。
不定义 Sign-up or Sign-in policy nor a Sign-up policy.
自定义策略
仅登录策略的问题是您只有基本的 UI 自定义选项。您没有获得 here.
中描述的全套功能使用自定义策略,您可以定义 Sign-Up/Sign-In 策略,然后禁用注册部分。如果 UI 定制如 here.
所述,这允许相同的级别- 通过CSS 隐藏注册link
- 从您的技术资料中删除
<Item Key="SignUpTarget">SignUpWithLogonUsernameExchange</Item>
<TechnicalProfile Id="SelfAsserted-LocalAccountSignin-Username-NoSignUp">
<DisplayName>Local Account Signin</DisplayName>
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Metadata>
<!-- Want to disable sign-up on unified policy -->
<!-- <Item Key="SignUpTarget">SignUpWithLogonUsernameExchange</Item> -->
<Item Key="setting.operatingMode">Username</Item>
<Item Key="ContentDefinitionReferenceId">api.selfasserted-ext-local</Item>
<Item Key="language.button_continue">Login</Item>
</Metadata>
...
</TechnicalProfile>
在内置策略(又名用户流)中,您可以选择仅登录策略。
在自定义策略中,您可以使用下面代码段中显示的元数据属性,无需定义任何自定义 css。
<TechnicalProfile Id="SelfAsserted-LocalAccountSignin-Email">
<DisplayName>Local Account Signin</DisplayName>
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Metadata>
<!-- Clear SignUpTarget for security reasons -->
<Item Key="SignUpTarget"></Item>
<Item Key="setting.operatingMode">Email</Item>
<Item Key="ContentDefinitionReferenceId">api.selfasserted</Item>
<!-- Remove signup and forgot password links -->
<Item Key="setting.showSignupLink">false</Item>
<Item Key="setting.forgotPasswordLinkLocation">None</Item>
</Metadata>
...
</TechnicalProfile>