Thanks for checking this, I left it for some time, checked back after few days. And access to service is restored and I can access my repos, I am the only admin, and same account (local repos wouldn't have synced back otherwise). I am unsure what was the cause. now git pull the locally cloned repos and also see the service enabled back.
Data Lose in Azure Devops - Repositories
I have been using azure devops from last 3+ years for hosting all of my private repositories. Today I randomly logged in to ADO portal, and I realized I don't see any repositories anymore. In fact, I don't even have the repository service enabled in the ADO. I had 20+ repository under this org, some of these repo's I have still in my local cloned. How can I lose all my git repositories? Any way to get my data back?
Azure DevOps
3 answers
Sort by: Most helpful
-
Siddhesh Desai 7,640 Reputation points Microsoft External Staff Moderator
2026-06-22T08:17:53.18+00:00 Thank you for reaching out to Microsoft Q&A.
Refer below points to resolve this issue:
1. Verify You Are Signed In With The Correct Account
Azure DevOps organizations can be associated with multiple Microsoft accounts, Entra ID tenants, or identities. If you sign in using a different identity than the one originally used to create or access the organization, repositories and projects may appear missing.
Sign out of Azure DevOps completely.
Open an InPrivate/Incognito browser window.
Sign in using the account that originally owned or administered the organization.
Verify that you are accessing the correct Azure DevOps organization URL.
2. Verify That Azure Repos Service Has Not Been Disabled
Azure DevOps allows repositories to be disabled at the project level. If Azure Repos has been disabled, repositories will not appear in the UI and Git operations can fail. Internal documentation confirms that repositories can be disabled and later re-enabled by a project administrator.
Navigate to Project Settings.
Select Repositories.
Check whether the repository service has been disabled.
Re-enable it if it has been turned off.
3. Verify Repository Permissions
The TF401019 error commonly occurs when the repository exists but the user no longer has permission to access it.
Ask a Project Administrator to verify:
Your membership in the Azure DevOps project.
Repository security settings.
Whether other users can still see the repositories.
Whether the repositories are visible under Project Settings → Repositories.
4. Ensure The User Has A Basic Access Level
Even if repository permissions are correctly assigned, users require an appropriate Azure DevOps access level to use Azure Repos.
Verify under:
Organization Settings → Users
Ensure the affected account has:
Basic access level (recommended)
Or a higher access level if applicable
If the account shows Stakeholder, repository access may be limited depending on the scenario and organization configuration.
5. Check Audit Logs For Repository Changes
If you are an Organization Administrator, review the Azure DevOps audit logs for any recent changes.
Navigate to:
Organization Settings → Auditing
Check for events such as:
Repository deletion
Project deletion
Permission modifications
User removal
Repository disablement
These logs can help determine whether the repositories were actually removed or whether access was modified.
6. Verify Repository Existence Using Azure DevOps REST API
If you still have access to the organization, verify whether the repositories are returned through the Azure DevOps APIs.
az repos list \2 --organization https://dev.azure.com/<organization> \3 --project "<project>"Alternatively, browse:
https://dev.azure.com/<organization>/<project>/_apis/git/repositories?api-version=7.12If repositories are returned, the issue is likely related to permissions or UI configuration rather than repository loss.
7. Preserve Existing Local Repository Clones
Since some repositories still exist on local machines, create backups immediately while troubleshooting.
Verify repository history:
git log --all git branch -a git tagCreate a mirror backup:
git clone --mirror <local-repository-path> backup.gitThese preserves commit history, branches, tags, and repository metadata currently available in the local clone.
8.Contact Azure DevOps Support If All Repositories Have Disappeared
Raise a request here with your issue: https://developercommunity.visualstudio.com/AzureDevOps
-
Ravi Kiran Pagidi 90 Reputation points
2026-06-20T19:33:24.7066667+00:00 I would not assume the repositories are permanently lost yet.
From the screenshot, two things stand out:
- The Repos service is not visible/enabled in the project services list.
git pullreturnsTF401019, which means the repository either does not exist at that path or your account no longer has permission to access it.Please check these in order:
Make sure you are in the correct Azure DevOps organization, tenant, and project. If you have multiple Microsoft accounts or directories, try an InPrivate browser session and sign in with the same account that owns the repos.
Ask an Organization Owner / Project Administrator to check:
Project settings > Overview > Azure DevOps services
If Repos is disabled, enable it again. Disabling a service removes it from the UI, but it should not delete the underlying service data.
Check repository permissions:
Project settings > Repositories > Security
Confirm your user still has access to the Git repositories.
Check whether the project or repositories were deleted. Deleted projects and recently deleted Git repositories may be recoverable for a limited time.
If you still have local clones, you may be able to recover the code by pushing them to a new/recovered repo:
git remote set-url origin https://dev.azure.com/<org>/<project>/_git/<repo> git push --all origin git push --tags originIf you had a full mirror clone, you can use:
git push --mirror originDocs:
Turn Azure DevOps services on/off: https://learn.microsoft.com/en-us/azure/devops/organizations/settings/set-services
Azure DevOps settings overview: https://learn.microsoft.com/en-us/azure/devops/organizations/settings/about-settings
Set Git repository permissions: https://learn.microsoft.com/en-us/azure/devops/repos/git/set-git-repository-permissions
Restore deleted project: https://learn.microsoft.com/en-us/azure/devops/organizations/projects/delete-project
Restore deleted Git repository from recycle bin: https://learn.microsoft.com/en-us/rest/api/azure/devops/git/repositories/restore-repository-from-recycle-bin
If Repos is missing for all users/admins and the repos are not visible in deleted/recycle-bin state, I would open an Azure DevOps support case with the organization name, project name, repo names, and the
TF401019error. Do not post private repo URLs or tokens publicly.Hi,I would not assume the repositories are permanently lost yet.
From the screenshot, two things stand out:
The Repos service is not visible/enabled in the project services list.
git pullreturnsTF401019, which means the repository either does not exist at that path or your account no longer has permission to access it.Please check these in order:
Make sure you are in the correct Azure DevOps organization, tenant, and project. If you have multiple Microsoft accounts or directories, try an InPrivate browser session and sign in with the same account that owns the repos.
Ask an Organization Owner / Project Administrator to check:
Project settings > Overview > Azure DevOps services
If Repos is disabled, enable it again. Disabling a service removes it from the UI, but it should not delete the underlying service data.
Check repository permissions:
Project settings > Repositories > Security
Confirm your user still has access to the Git repositories.
Check whether the project or repositories were deleted. Deleted projects and recently deleted Git repositories may be recoverable for a limited time.
If you still have local clones, you may be able to recover the code by pushing them to a new/recovered repo:
git remote set-url origin https://dev.azure.com/<org>/<project>/_git/<repo> git push --all origin git push --tags originIf you had a full mirror clone, you can use:
git push --mirror originDocs:
Turn Azure DevOps services on/off:
https://learn.microsoft.com/en-us/azure/devops/organizations/settings/set-servicesAzure DevOps settings overview:
https://learn.microsoft.com/en-us/azure/devops/organizations/settings/about-settingsSet Git repository permissions:
https://learn.microsoft.com/en-us/azure/devops/repos/git/set-git-repository-permissionsRestore deleted project:
https://learn.microsoft.com/en-us/azure/devops/organizations/projects/delete-projectRestore deleted Git repository from recycle bin:
https://learn.microsoft.com/en-us/rest/api/azure/devops/git/repositories/restore-repository-from-recycle-binIf Repos is missing for all users/admins and the repos are not visible in deleted/recycle-bin state, I would open an Azure DevOps support case with the organization name, project name, repo names, and the
TF401019error. Do not post private repo URLs or tokens publicly.