Azure AD B2C是一种云身份管理解决方案,适用于面向客户(消费者和企业)的Web和移动应用程序。
我正在为本地帐户登录启用“保持登录状态”设置。 目前,技术配置文件设置如下。 我如何设置单独的技术配置文件来捕获
隐藏 Azure B2C AD 自定义策略中 UI 中的元素
我试图隐藏 Azure AD B2C 自定义策略中的某些元素: 密码重置页面上需要隐藏“更改电子邮件”按钮。 进入 MFA OTP 页面上的“继续”按钮...
如果有多个Azure b2c登录页面,登录时请求错误或无响应
我们正在将 Azure B2C 用于我们的几个 Web 应用程序。用户可以使用 M365 身份验证或本地帐户通过 Azure B2C 登录我们的 Web 应用程序。一般用
我正在将 AD 租户作为联合身份提供商连接到 ADB2C 租户。在最后的编排步骤中,发送声明: 我正在将 AD 租户作为联合身份提供商连接到 ADB2C 租户。在最后的编排步骤中,发送声明: <OrchestrationStep Order="6" Type="SendClaims" CpimIssuerTechnicalProfileReferenceId="JwtIssuer" /> 我收到错误:“'{ourTenant}.onmicrosoft.com' 中的 B2C_1A_signup_signin' 策略指定了声明集合中缺少的主题声明 'sub'。异常类型:PolicyException” 但是,当我在 VSCode 中或直接在 Application Insights 中检查时,该声明似乎确实存在于集合中: 来自应用程序洞察... 例外情况 “{tenant}.onmicrosoft.com”中的“B2C_1A_signup_signin”策略指定了声明集合中缺少的主题声明“sub”。 索赔 账户类型:员工 替代安全 ID: {"type":6,"identityProvider":"https://login.microsoftonline.com/{id}/v2.0","key":"Z3J...."} 身份验证来源:socialIdpAuthentication 显示名称:Paul identityProvider:https://login.microsoftonline.com/{id}/v2.0 发行者用户 ID:grGppTQoYIYEseflV6OklohGWHJCiHVuo0WnqTm3bY8 子:grGppTQoYIYEseflV6OklohGWHJCiHVuo0WnqTm3bY8 租户Id:{id} upn用户名:bd3e055d-172e-4282-b6a3-47cac965d10a userPrincipalName:cpim_bd3e055d-172e-4282-b6a3-47cac965d10a@{租户}.onmicrosoft.com 完整代码如下。仅执行步骤 1,2 和 6(3,4,5)用于本地登录): <UserJourney Id="SignUpOrSignIn"> <OrchestrationSteps> <!-- Check if staff or member --> <OrchestrationStep Order="1" Type="ClaimsExchange"> <ClaimsExchanges> <ClaimsExchange Id="AccountTypeInputCollectorClaimsExchange" TechnicalProfileReferenceId="AccountTypeInputCollector"/> </ClaimsExchanges> </OrchestrationStep> <!-- HANDLE STAFF LOGIN--> <OrchestrationStep Order="2" Type="ClaimsExchange"> <Preconditions> <Precondition Type="ClaimsExist" ExecuteActionsIf="true"> <Value>objectId</Value> <Action>SkipThisOrchestrationStep</Action> </Precondition> <Precondition Type="ClaimEquals" ExecuteActionsIf="false"> <Value>accountType</Value> <Value>staff</Value> <Action>SkipThisOrchestrationStep</Action> </Precondition> </Preconditions> <ClaimsExchanges> <ClaimsExchange Id="SignUpWithLogonEmailExchange-Staff" TechnicalProfileReferenceId="LocalAccountSignUpWithLogonEmail" /> <ClaimsExchange Id="FederatedClaimsExchange" TechnicalProfileReferenceId="AAD-Company-OpenIdConnect" /> </ClaimsExchanges> </OrchestrationStep> <!-- HANDLE NON-STAFF LOGINS--> <OrchestrationStep Order="3" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="api.signuporsignin"> <Preconditions> <Precondition Type="ClaimsExist" ExecuteActionsIf="false"> <Value>accountType</Value> <Action>SkipThisOrchestrationStep</Action> </Precondition> <Precondition Type="ClaimEquals" ExecuteActionsIf="true"> <Value>accountType</Value> <Value>staff</Value> <Action>SkipThisOrchestrationStep</Action> </Precondition> </Preconditions> <ClaimsProviderSelections> <ClaimsProviderSelection ValidationClaimsExchangeId="LocalAccountSigninEmailExchange" /> </ClaimsProviderSelections> <ClaimsExchanges> <ClaimsExchange Id="LocalAccountSigninEmailExchange" TechnicalProfileReferenceId="SelfAsserted-LocalAccountSignin-Email" /> </ClaimsExchanges> </OrchestrationStep> <OrchestrationStep Order="4" Type="ClaimsExchange"> <Preconditions> <Precondition Type="ClaimsExist" ExecuteActionsIf="true"> <Value>objectId</Value> <Action>SkipThisOrchestrationStep</Action> </Precondition> <Precondition Type="ClaimEquals" ExecuteActionsIf="true"> <Value>accountType</Value> <Value>staff</Value> <Action>SkipThisOrchestrationStep</Action> </Precondition> </Preconditions> <ClaimsExchanges> <ClaimsExchange Id="SignUpWithLogonEmailExchange" TechnicalProfileReferenceId="LocalAccountSignUpWithLogonEmail" /> </ClaimsExchanges> </OrchestrationStep> <!-- This step reads any user attributes that we may not have received when in the token. --> <OrchestrationStep Order="5" Type="ClaimsExchange"> <Preconditions> <Precondition Type="ClaimEquals" ExecuteActionsIf="true"> <Value>accountType</Value> <Value>staff</Value> <Action>SkipThisOrchestrationStep</Action> </Precondition> <Precondition Type="ClaimsExist" ExecuteActionsIf="false"> <Value>objectId</Value> <Action>SkipThisOrchestrationStep</Action> </Precondition> </Preconditions> <ClaimsExchanges> <ClaimsExchange Id="AADUserReadWithObjectId" TechnicalProfileReferenceId="AAD-UserReadUsingObjectId" /> </ClaimsExchanges> </OrchestrationStep> <OrchestrationStep Order="6" Type="SendClaims" CpimIssuerTechnicalProfileReferenceId="JwtIssuer" /> </OrchestrationSteps> <ClientDefinition ReferenceId="DefaultWeb" /> </UserJourney> 技术简介: <ClaimsProvider> <Domain>Company</Domain> <DisplayName>Login using Staff_Test_AD</DisplayName> <TechnicalProfiles> <TechnicalProfile Id="AAD-Company-OpenIdConnect"> <DisplayName>Continue with Active Directory</DisplayName> <Description>Login with an account in the staff Active Directory</Description> <Protocol Name="OpenIdConnect"/> <Metadata> <Item Key="METADATA">https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration</Item> <Item Key="client_id">{Settings:ADFederatedTestApplicationId}</Item> <Item Key="response_types">code</Item> <Item Key="scope">openid profile</Item> <Item Key="response_mode">form_post</Item> <Item Key="HttpBinding">POST</Item> <Item Key="UsePolicyInRedirectUri">false</Item> <Item Key="DiscoverMetadataByTokenIssuer">true</Item> <!-- The key below allows you to specify each of the Azure AD tenants that can be used to sign in. Update the GUIDs below for each tenant. --> <Item Key="ValidTokenIssuerPrefixes">https://login.microsoftonline.com/{Settings:ADFederatedTenantId}</Item> <!-- The commented key below specifies that users from any tenant can sign-in. Uncomment if you would like anyone with an Azure AD account to be able to sign in. --> <!-- <Item Key="ValidTokenIssuerPrefixes">https://login.microsoftonline.com/</Item> --> </Metadata> <CryptographicKeys> <Key Id="client_secret" StorageReferenceId="B2C_1A_StaffAdTest"/> </CryptographicKeys> <OutputClaims> <OutputClaim ClaimTypeReferenceId="issuerUserId" PartnerClaimType="sub"/> <OutputClaim ClaimTypeReferenceId="sub" PartnerClaimType="sub"/> <OutputClaim ClaimTypeReferenceId="tenantId" PartnerClaimType="tid"/> <OutputClaim ClaimTypeReferenceId="givenName" PartnerClaimType="given_name" /> <OutputClaim ClaimTypeReferenceId="surName" PartnerClaimType="family_name" /> <OutputClaim ClaimTypeReferenceId="displayName" PartnerClaimType="name" /> <!-- <OutputClaim ClaimTypeReferenceId="authenticationSource" DefaultValue="localAccountAuthentication" AlwaysUseDefaultValue="true" /> --> <OutputClaim ClaimTypeReferenceId="identityProvider" PartnerClaimType="iss" /> <OutputClaim ClaimTypeReferenceId="authenticationSource" DefaultValue="socialIdpAuthentication" AlwaysUseDefaultValue="true" /> </OutputClaims> <OutputClaimsTransformations> <OutputClaimsTransformation ReferenceId="CreateRandomUPNUserName"/> <OutputClaimsTransformation ReferenceId="CreateUserPrincipalName"/> <OutputClaimsTransformation ReferenceId="CreateAlternativeSecurityId"/> <!-- <OutputClaimsTransformation ReferenceId="CreateSubjectClaimFromAlternativeSecurityId"/> --> </OutputClaimsTransformations> <!-- <UseTechnicalProfileForSessionManagement ReferenceId="SM-AAD"/> --> <UseTechnicalProfileForSessionManagement ReferenceId="SM-SocialLogin"/> </TechnicalProfile> </TechnicalProfiles> </ClaimsProvider> 已确保索赔已在索赔集中通过 添加了应用程序洞察并经过验证 我没有看到任何突出的东西! 可能与注释掉“CreateSubjectClaim...”有关? 你的RP是什么样的? 你有没有尝试过类似的事情: <OutputClaim ClaimTypeReferenceId="temp" PartnerClaimType="sub"/> 在联邦然后: <OutputClaim ClaimTypeReferenceId="temp" PartnerClaimType="sub"/> 在 RP 中?
目前我们在Azure B2C租户中有一个应用程序注册。我们希望将 Group 声明作为 B2C 用户令牌的一部分包含在内。 尝试了以下方法 将应用程序注册清单更新为“
我使用查询参数(路径)值在内容定义中构造加载 URI,如下所示: 我使用查询参数(路径)值在内容定义中构造加载 URI,如下所示: <ContentDefinition Id="api.selfasserted.errorpage"> <LoadUri>https://{OAUTH-KV:path}/error.html</LoadUri> <DataUri>urn:com:microsoft:aad:b2c:elements:contract:selfasserted:2.1.7</DataUri> </ContentDefinition> 有没有办法为 LoadUri 中的查询参数设置默认值,以便在有人未在 URL 中传递任何查询参数时它不会失败? 不,您的 LoadUri 的域部分不可能有后备位置。 但是,您可以通过不同的方式构建它,通过参数化 URL 的路径部分来实现您想要实现的目标。 <LoadUri>https://{OAUTH-KV:path}/error.html</LoadUri> 会变成 <LoadUri>https://mytemplates.co.uk/{OAUTH-KV:brand}/error.html</LoadUri> 然后您将在您的网站/存储帐户上托管两个模板: https://mytemplates.co.uk/LeosBrand/error.html(如果提供了参数);https://mytemplates.co.uk/error.html(如果没有参数,这将是后备)。 这并不能阻止人们给你一个错误的参数和不匹配的路径,但可以通过使用应用程序逻辑进行排序(这意味着与静态托管文件相比,应用程序服务)。 您还可以使用 ContentDefinitionParameters 将变量移动到查询参数 - https://mytemplates.co.uk/error.html 的加载 URI 将请求位于 https://mytemplates.co.uk/error.html?brand=LeosBrand 的模板
NextAuth Azure AD B2C - NextJS Pages Typescript 中未定义访问令牌
我一直在尝试在会话中附加访问令牌,但我没有获得访问令牌的值。 我不确定我是否做对了一切: 从“节点:util”导入 util; 进口Ne...
Azure AD B2C 用户流在保存“访问令牌(隐式流)”时抛出“访问...已被 CORS 策略阻止:不允许方法 PATCH...”
在我的 Azure AD B2C 中,我创建了一个应用程序来实现用户流。 不幸的是,当我尝试“运行用户流”时,我得到的令牌不正确并且无法解码。 我红色它是为了解决...
我正在尝试将Azure AD B2C集成到ASP.net core MVC应用程序中。它最初显示登录页面,当输入用户名和密码后单击“登录”时,它会进入循环。
我们希望为许多使用 Azure B2C 的客户实施身份管理解决方案。我创建了一个概念验证,并且目前已经设置完毕。 我们现在希望实施...
Azure AD B2C 是否支持 JWT 令牌中的“角色”声明以进行授权?
我正在使用 Azure AD B2C,并且我有一个关于在 JWT 令牌中包含“角色”声明以用于授权目的的要求。我的目标是分配不同的访问级别和
关于这个问题: 具有 Azure AD 登录功能的 .NET Core WebApi 安全 Hangfire 仪表板 我已经为hangfire仪表板实现了带有azure AD身份验证的hangfire,例如jarodsmk a...
为 Azure B2C 中的 SAML 联合提供通用 PartnerEntity
我们有一个 SaaS 应用程序,其中我们的 IDP 是 Azure B2C。 我们使用 Azure B2C 来允许企业 SSO 与外部联合 (SAML)。使用 B2C,每次输入都需要设置一个 ClaimsProvider...
当使用client_credential和authorization_code授权类型时,当使用相同的客户端id和使用B2请求的范围时,我得到相同的值,但格式不同的JWT aud声明...
我正在尝试为 Azure AD B2C 实施密码更改自定义策略。 我已使用此文件作为基础,更改了tenantid,并将其上传到Azure。 当我尝试从 Azure 门户进行演示时,它...
Azure AD B2C - 缓存位置从 sessionStorage 更改为 localStorage
我正在使用一个 React 单页应用程序,该应用程序使用 Azure ADB2C 进行用户注册和登录。 该应用程序已投入生产,为客户提供服务。 我们正在使用 @msal/browser & @...
如何有条件地转换 Azure B2C 自定义策略中的 SignInName 声明
我需要能够使用电子邮件和电话号码以及常规密码(不是 OTP)登录 azure B2C。我不想使用 OTP 短信,因为我需要双因素登录,而 OTP 是第二个
我们希望部分用户需要使用 MFA,而部分用户无需使用 MFA 即可登录。为此,我们有两个组“需要 MFA”和“不需要 MFA”。当我们想要激活 MFA 时...
我正在尝试自动上传自定义策略,因为我有多个租户,并且每个租户都包含多个自定义策略。 我对 Azure cli 或 SDK 感兴趣。我海...
当我登录到使用 ADB2C 保护的 Web 应用程序时,登录页面会显示一些预先填充的信息(正如我告诉浏览器的那样)。当我直接单击“登录”按钮时,会显示错误...