How to switch Repo in Azure Static Web App?

Nidhey Shah 0 Reputation points
2025-12-17T12:10:01.1733333+00:00

When I created the Static Web App, I set the deployment for authorization policy as Github.
Signed in, selected a repo and branch. However, after the creation of resource, I dont have the option change the branch or Repository.

I recently moved my persoanl Repo into an a Github Orginization and I need to reauthenticate the connection to Azure App, so the app can be deployed.
However, all I have is the option to change account.
User's image

How do I make it deployment ready again? (I have tried changing the Deployment token as well.)

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SUNOJ KUMAR YELURU 17,401 Reputation points MVP Volunteer Moderator
    2025-12-17T14:38:40.7566667+00:00

    Hello @Nidhey Shah,

    To make your Azure Static Web App deployment ready again after moving your repository to a GitHub organization, you will need to update the branch names in your app’s GitHub workflow. This involves modifying the on section of your workflow file to reflect the new branch you want to deploy from. For example:

    on:

    push:

    branches:

    - release

    pull_request:

    types: [opened, synchronize, reopened, closed]

    branches:

    - release

    Additionally, if you need to reauthenticate the connection to Azure, you might have to reset the deployment token. This token is used to identify the application during deployment and is stored as a secret in your GitHub repository. To reset it, go to your Azure Static Web Apps site and select Manage deployment token on the Overview page, then select Reset token. After that, you will need to update the corresponding secret in your GitHub repository with the new token value.


    If the Answer is helpful, please click Accept Answer and Up-Vote 👍, so that this can be beneficial to other community members.

    0 comments No comments

Your answer

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