Server error occured while using B2C on Azure API Management Develop portal

I want to add the ability to sign in or up for my APIM developer portal via any Microsoft account type (personal or corporate, work …).

I have uploaded SocialAndLocalAccounts custom policy from the starter pack (removed the Facebook provider and added AADCommon-OpenIdConnect) – I have attached these files below.

I have errors while I’m trying to sign up via a local or Microsoft account.

Let’s try to look Microsoft account (multitenant)

  1. Click “Multi-Tenant ADD” button

  2. When you filled the email and password, you will be redirected to webPortal.com/signup-oauth#provider=AadB2C&token=eyJhbGciOiJSUzI1NiIsImtpZ…

  3. Looks like, all is good except that we have lost the session, and when we press “sign up” button, we get an exception:

  4. the JWT token

Similar behavior I have when I try to sign up via a local account, but on the first step – record with user created in b2c tenant and then we can sign in by login and password:

  1. When I filled email and password and confirmed email address, this one error, and 401 error code for “/identity”, and 403 for “/users” endpoints .

    • The requests to Users and Identity have a header: Authorization: AadB2C
      id_token=”eyJhbGciOiJSUzI1NiIsImtpZC…..”
  2. When I try to click “Microsoft Account” again – server redirects me to this one page:

  3. The jwt from the local account is this one:

So, Azure Active Directory B2C tenant has:

  • App registrations – apimb2cdemo with secret code, that I have set to
    APIM Identity (Accounts in any identity provider or organizational
    directory (for authenticating users with user flows))
  • SocialAndLocalAccounts custom policy from the starter pack (Attached)
  • app registrations – ProxyIdentityExperienceFramework – app (Accounts
    in this organizational directory only (Tenant only – Single tenant))
  • app registrations – IdentityExperienceFramework – app (Accounts in
    this organizational directory only (Tenant only – Single tenant))
  • app registrations – webapp1 – app (just for testing – jwt.ms)
    (Accounts in any identity provider or organizational directory (for authenticating users with user flows))

APIM Developer portal tenant has:

  • app registrations – Azure AD B2C App with secret code, that I have
    set to my ClaimsProvider in TrustFrameworkExtensions
  • Redirect URL:
    https://your-b2c-tenant-name.b2clogin.com/your-B2C-tenant-name.onmicrosoft.com/oauth2/authresp

  • (Accounts in any organizational directory (Any Microsoft Entra ID
    tenant – Multitenant) and personal Microsoft accounts (e.g. Skype,
    Xbox)) – Here, I chose a different option compared to the article

  • new one Identity provider in APIM Developer portal Menu

  • Azure Active Directory B2C – has reference to apimb2cdemo app with id
    and secret key and custom policy name and Client library – MSAL.

For this task, I am using these tutorials:

https://learn.microsoft.com/en-us/azure/active-directory-b2c/tutorial-create-user-flows?pivots=b2c-custom-policy (from 1 to 3 tutorials)

https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-aad-b2c

https://learn.microsoft.com/en-us/azure/active-directory-b2c/identity-provider-azure-ad-multi-tenant?pivots=b2c-custom-policy

I have no idea what happened and why I have faced these issues, could you please assist me with this issue?

I’m looking forward to any ideas and solutions.

Thank you in advance!

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật