skip to Main Content

I am following this turorial and trying to link Function App to Static Web App. But I keep getting "Cannot link backend with a preexisting Azure Static Web Apps configuration."
.

However, I could link this Function App to another test Static Web App. And those two Static Web Apps are identical, well atleast I am pretty sure they are identical.

  • When creating a Static Web app deploy routine I left api location empty – api_location: "".
  • Static Web App is using Standart plan (not free).

enter image description here

EDIT

Adding Static Web App JSON view.

enter image description here

2

Answers


  1. Issue may cause because of Read-only Lock under configuration setting

    1. Created a new Static WebApp on West Europe Region
      enter image description here

    2. If any lock exists on Static Web Apps should not allow to add any backend APIs
      enter image description here

    3. Link new Backend APIs as Function App with Lock
      enter image description here

    4. After Removal of lock, Static Web Apps will allow to link new Backend
      enter image description here

    enter image description here

    enter image description here

    enter image description here

    API Version check :
    enter image description here

    Login or Signup to reply.
  2. Regarding documentation:

    "If a backend was previously linked to another static Web App, the auth configuration must first be removed from the backend before linking to a different Static Web App"

    Check az staticwebapp backends validate:
    https://learn.microsoft.com/en-us/cli/azure/staticwebapp/backends?view=azure-cli-latest

    If you link your Static Web App (swa) with a backend and then remove the swa do not forget to go to "Settings" and remove "Authorization" from your backend (this setting was created automatically when you linked the swa but not removed when you delete it)

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search