New Error from old Azure AD Registration & SUSI Flow: The requested content does not exist.

Siegfried Heintze 1,881 Reputation points
2023-11-03T22:32:48.4666667+00:00

Background:

I implemented this tutorial in March 2023 (https://learn.microsoft.com/en-us/azure/api-management/howto-protect-backend-frontend-azure-ad-b2c) and it has been working fine since then until recently when I started getting this error after successfully getting the log-in page and clicking the login button.

Error:

The requested content does not exist.
HttpStatusCode: 404
ErrorCode: WebContentNotFound
RequestId : 47e5d2b1-501e-000d-3097-0e80a4000000
TimeStamp : 2023-11-03T20:48:26.8692611Z

All Attempted Diagnosis and Repairs have Failed:

  1. Since I thought it as a problem with the static web site, I inserted the current date and time (the built at times stamp) in the static HTML file and uploaded it again and verified that when I went to the web site, the login page with the login button displayed the current data and time. This means that the new HTML was successfully uploaded and the static web site is working fine.
  2. I used the portal to see if something (like a secret) has expired. The app registration looks fine. Under the "Certificates & secrets" column there is a nice green circular icon with a check mark. Good. I cannot see anything else wrong with this app registration.
  3. I tried following a portion of the tutorial again to create a second front end Azure AD app registration with a new clientid and updated the HTML accordingly (and uploaded it to the static web app) and this did not help: same error.
  4. While inside the portal I was looking for problems with the SUSI flow that I was using. As per the tutorial, I clicked on Policies -> User Flows, select the original SUSI (called B2C_1_Frontend_APIM_Totorial_SUSI) and clicked on "Run user flow") and got the same error! Ah hah! There must be something wrong with the user flow and not the web site. I think this is the most important clue.
  5. So I followed the tutorial again and created a new SUSI called B2C_1_Frontend_APIM_Totorial_SUSI_002, updated the static HTML file, uploaded it with a new time stamp and tried to run that and same error! Hmph!
  6. I also had another AADB2C tutorial (https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/3-Authorization-II/2-call-api-b2c/SPA) running on localhost:4200 with an AADB2C app registration called aadb2cSPAngularToDo. I confirmed that when I run "npm start" I can still login. So I go back to the portal and change the redirect URL on this aadb2cSPAngularToDo app registration from https://localhost:4200 to the URL for the static web site in the first tutorial (https://learn.microsoft.com/en-us/azure/api-management/howto-protect-backend-frontend-azure-ad-b2c). I also update the HTML with the different SUSI and client id and upload it with a new time stamp and try using this client that I know works. Shucks. Same error. I change the redirect URL back to https://localhost:4200 and this angular tutorial continues to work fine.

I hope someone can help me fix this!

Thanks again!

Siegfried

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,062 questions
{count} votes

Accepted answer
  1. navba-MSFT 23,095 Reputation points Microsoft Employee
    2023-11-07T05:31:33.84+00:00

    @Siegfried Heintze Welcome to Microsoft Q&A Forum, Thank you for posting your query here!
    I understand that you are facing an error while trying to log in to your Azure AD-protected web application. The error message they received is The requested content does not exist. with a 404 error code. You have tried several troubleshooting steps, including checking the app registration, creating a new SUSI flow, and changing the redirect URL, but the error persists.

    I looked at the above failing error request ID 47e5d2b1-501e-000d-3097-0e80a4000000 in our backend logs. This error is specific to the Azure storage static HTML.

    Within your Azure Storage account (stgstXXXXXXXapim) Static website ensure that you have added the index.html page as shown below:
    User's image

    Also for the signin please try hardcoding the complete url as shown below:

    https://stgstXXXXXXapim.z22.web.core.windows.net/index.html

    Hope this helps.

    **
    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.