Repository Problem in Azure DevOps, error code TFS.WebAPI.Exception: TF401027 - azure

I'm running into an error code in the Pull request manager Hub in the Azure DevOps:
There was an error during the extension load: TFS.WebApi.Exception: TF401027: You need the Git 'GenericRead' permission to perform this action. Details: identity '...', scope 'repository'.
which leaves me a bit baffling since the team lead and manager is already sure that I have permission to view pull request, I could even comment and fix pull request that I was added on, but the manager hub is where it refused to show up for me.
the permission management
enter image description here

This error occurs when a user with a stakeholder license tries to create a repository
Solution: Upload the license of the user from “StakeHolder” to “Basic” or get him MSDN Visual Studio Professional or Enterprise subscription
By default stakeholders won’t have access to repos but they can try to create repository from organization settings..

Related

Unable to connect to Azure DevOps from Azure Logic Apps

I’m trying to queue Azure DevOps pipeline from Azure Logic App. When I create workflow, the connection is configured correctly without any issue. However, the project dropdown list is unable to populate team project and same as build definition id dropdown list. The organization dropdown list is populated correctly. I do have team project administrator to the team project, and do have logic app contributor. I'm also able to get list of team project from this organization using REST-API. Here is an error I got:
Could not retrieve values. Error code: ‘Unauthorized’, Message: ‘TF400813: The user ‘573f1013-71ca-6a2f-ac35-ba1bef678b59’ is not authorized to access this resource.
Azure DevOps ActivityId: 0ba5ef8c-4ac4-4810-bf92-7835ca5bf444
Details: TF400813: The user ‘573f1013-71ca-6a2f-ac35-ba1bef678b59’ is not authorized to access this resource.
clientRequestId: eae306a3-f638-424b-96e5-579a70c9dcf7’. More diagnostic information: x-ms-client-request-id is ‘F6A975D5-74AA-41E3-9DCA-70A508139387’.
Error code: ‘Unauthorized’, Message: ‘TF400813: The user ‘573f1013-71ca-6a2f-ac35-ba1bef678b59’ is not authorized to access this resource. Azure DevOps ActivityId: 0ba5ef8c-4ac4-4810-bf92-7835ca5bf444
According to the error message, it may be that the account you logged in in the Queue a build action selected the wrong domain (AAD directory).
You can try the following steps to sign in the account again in the queue a build action.
Here are the steps:
Step1: Navigate to this user Profile URL: https://aex.dev.azure.com/me?mkt=zh-CN&campaign=o~msft~old~vsts~profile
Then you could select the correct AAD directory.
Step2: Sign in your account to Azure DevOps in Azure Logic App again.
You need to check if the domain is correct.

Error creating new repository (PERMISSION_DENIED)

I have a problem creating a new repository in Cloud Source Repository (console or gcloud).
In the gcloud case, when I run the following command using either an user account with roles/owner or a service account with roles/source.admin:
gcloud source repos create new-repo
I get the following error:
ERROR: (gcloud.source.repos.create) ResponseError:
status=[PERMISSION_DENIED], code=[403], message=[User [xxx#xxx] does
not have permission to access projects instance [PROJECT_ID] (or it
may not exist): The caller does not have permission].
The project currently has no repositories associated to it. I was able to create one earlier (through the console) which I then deleted before using. I have been unable to create any subsequent repositories since.
Would love to hear some suggestions if anyone else has faced a similar issue.
As you mentioned to have the proper roles on the account this issue is due to not having a billing account linked to the project.
The API methods used to create a repository require the billing on the project to be enabled so to solve it if this is the issue you can perform the following steps
Go to https://console.cloud.google.com/billing
Select the project where you want the repository to reside
Click on Link a Billing Account
A Popup message will show, over there click on Create Billing Account
Follow the wizard

How to disconnect GitHub from Azure Data Factory V2 to enable "Copy data" Feature?

So the problem is that I created Azure Data Factory with git enabled on the portal. After the resource was validated and created, and after clicking on Author and Monitor, the "Copy Data" feature seems to be disabled as shown in the picture below:
When hovered on the "Copy Data": This feature is disabled in 'Data Factory' mode as your factory has GIT enabled. Please switch to 'GIT' mode to use this.
After clicking on the Manage, the disconnect button seems to be disabled again as shown in the picture below.
How do I enable the button and disconnect my GitHub to enable "Copy data" feature?
Update:
Nandan said to check on Author but it is disabled as well.
On the home page of Azure Data Factory, can you see the option "Git repo settings" at the upper right corner? If yes, you can try to remove the GIT connection via this option.
Below are the tickets for the similar questions, you can reference:
Enable Publishing in 'Data Factory' mode
You are not allowed to make changes or publish from 'Data Factory' mode as your factory has GIT enabled
You can disable the GIT by disconnecting via Manage option as seen below:
But initially you would need to go to Author section to hover to drop down to change from Data factory mode to Git Mode:
The above images are via account which has access on GIT as well as ADF.
I logged in via an Account which has contributor access on ADF but no access on the repo and when I logged into ADF I got the below warning which got blocked in pop up of explorer :
And when I clicked on continue, and when I went to Manage section ; the disconnect option was disabled for me as seen below
So I added my account to Repo and after sometime I was able to manage the GIT in ADF
I'm having the exact same issues as the OP. I have an username#mybusiness.itservices user on Azure and a myname#gmail private GitHub account, and it's impossible to invite the Azure user because they don't have an email (they are just for administering Azure resources).
Integration with GitHub: 1) didn't work at all when configured at the launch time of ADF, 2) worked for one session when created within a new ADF instance, and 3) doesn't work when logging back into ADF.
I get the exact same issues: cannot disconnect from git:
and can't change into Git mode to do any work in ADF:
Naturally, the GitHub account has ADF authorised but there's no collaborator on the repo because I can't invite a user who doesn't have email:
None of the linked resources deal with this issue because there's no way to disconnect Git from ADF unless the "disconnect" button is no longer greyed-out. I would really appreciate any more ideas.
I ran into this issue myself and was able to resolve it. It occurred because the collaboration branch was deleted. In the browser, I was unable to select Git mode because it was confused.
To fix it, I turned to PowerShell. You need Powershell with the Az cmdlets installed.
https://learn.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-5.3.0
You'll need to know:
Subscription name in Azure
Data Factory name
Collaboration branch in github
Root folder in github
Account name for github
Repository name in github
Fire up Powershell with the Azure cmdlets and do like so...
Connect-AzAccount
Set-AzContext "<yoursubscriptionname>"
$dataFactory = Get-AzDataFactoryV2 -Name "<your data factory name>"
Set-AzDataFactoryV2 -InputObject $dataFactory -CollaborationBranch "<branch>" -RootFolder "<github root folder>" -AccountName "<github account>" -RepositoryName "<github repository>" -HostName "https://github.com"
When I ran that series of Powershell commands, it asked me if I wanted to overwrite, I said yes. Then I was able to deal with Git in Data Factory again.

Azure Storage Explorer : Unable to retrieve child resources

Getting error ONLY while accessing Blob storage.
No issues in Queues, File Share or table.
Any idea ?
Unable to retrieve child resources.
Details:
["FetchError:request to https://fssaicessunsetsbxv1sa.blob.core.windows.net/?include=metadata&comp=list failed, reason: unable to get local issuer certificate"]
Error : Self-Signed Certificate in Certificate Chain ,Unable to retrieve child resources.
Issue for me: I am attached with office proxy server. But Azure Storage Explorer is not using that proxy.
Solution:
Azure Storage Explorer -> Edit -> Configure Proxy,
Source = No proxy "Changed to" Use System proxy(preview)
After making these changes; I am able access the resources.
Moreover, Verify the permissions do you have on the connection string?
To generate your connection string either through the Azure Portal or some apps. When you generate the connection string, you need to give "Allowed permissions". Beside Read/Write you also need the List permission so Storage Explorer can list the blobs. Here is a screenshot in Azure portal to check/uncheck the permissions:
Have set any RBAC policies?
If you are connected to Azure through a proxy, verify that your proxy settings are correct. If you were granted access to a resource from the owner of the subscription or account, verify that you have read or list permissions for that resource.
If possible can you try to un-install and reinstall the latest version and check for the status of the issue.
Azure Storage Explorer Troubleshooting: "unable to retrieve child resources” or “The request action could not be completed”.
If the issue still persist after trying above mentioned steps, I would like to work closer on this issue. Let me know the status
Warning: For the noobs !
if you got luck you can also fix it by closing and re-opening the visual studio.
Reason: Authorization is tightly coupled with azure
Motivation: To err is Human ! Even Soft. DEV working at Microsoft are Human.

Azure Data Factory GitHub Integration Private Repo

I only seem able to integrate my ADFv2 instance with public repos in my organisation, which is undesirable.
In the documentation (https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/data-factory/source-control.md#author-with-github-integration), it states that:
..can use both public and private GitHub repositories with Data Factory as long you have read and write permission to the repository..
So, i complete the following steps:
Navigate to my GitHub Org.
Create a new "Private" repo, initialised w/ README.MD.
Create a new "Internal" repo, initialised w/ README.MD. (this is GitHub Enterprise Cloud)
In the Azure Portal, create a new ADFv2 instance without Git integration.
Click "Set up code repository" in the ADFv2 instance.
Choose, RepoType: GitHub - Authenticate w. GitHub pop-up.
Enter org name in to the GitHub Account section.
Git repo name: No results found
🤷🏼‍♂️
The solution turned out to be the need to grant access as an Authorized OAuth App to the organisation. I did not have permission to do this.
You can then find it under 'Applications' once done.. but i think when you first connect up your ADF to GitHub, it prompts you if you would like to grant it.
I was not seeing this due to permissions on the Org.

Resources