how do i fix b2c authority uri should have at least 3 segments when i already have them in my json file?

MysticsDen 70 Reputation points
2023-04-13T00:18:05.7266667+00:00

User's image

I placed the code in the next segment with the right info just don't want the ids to be out and about I'm pretty sure I should have this code in my launch settings with this code and the correct info but this exception keeps coming up any help with this would be awesome!

            "AzureAdB2C": {
                "Instance": "https://
Microsoft Security | Microsoft Entra | Microsoft Entra External ID
{count} votes

1 answer

Sort by: Most helpful
  1. Akshay-MSFT 17,961 Reputation points Microsoft Employee Moderator
    2023-04-18T12:45:28.5233333+00:00

    @MysticsDen Thank you for posting your query on Microsoft Q&A.

    From the above code snippet I could see that you have passed all 3 segments in "Instance".

    Kindly use the following syntax:

      "AzureAdB2C": {
        "Instance": "https://contoso.b2clogin.com/tfp/",
        "ClientId": "...",
        "CallbackPath": "/signin-oidc",
        "Domain": "contoso.onmicrosoft.com",
        "SignUpSignInPolicyId": "...",
        "ResetPasswordPolicyId": "...",
        "EditProfilePolicyId": "..."
      },
    

    Here "Instance" should not contain anything beyond tfp, the other 2 segment values are passed in "Domain" and "Policy names". Every time policy is called the URL will be formed after fetching info from defined parameters.

    I was able to test this in my lab :

    User's image

    and got the tfp value as "signupsigninpolicyId" in the claims

    User's image

    Please do let me know if you have any further queries in the comments section.

    Thanks,

    Akshay Kaushik

    Please "Accept the answer" (Yes), and share your feedback if the suggestion works as per your business need. This will help us and others in the community as well.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.