How to create Azure Devops service connection using system.accesstoken in a script

Viewed 198

I want to create a "Service Connection" using system.accesstoken of Azure devops instead of using "PAT" of the user. what are the permissions that should be given to system.accesstoken to create a service connection.

I tried giving all the access to "Project Collection Build Service ({OrgName})", "{Project Name} Build Service ({Org Name})" identities. But it did not work. enter image description here

1 Answers

You need to define role on service connection security tab for Project Collection Build Service (account):

enter image description here

enter image description here

Related