Skip to content

Publish fails for service principal #454

@pownkel

Description

@pownkel

I'm trying to publish our extension with an Azure access token for a service principal, which I've added to my publisher with "Contributor" access (following this blog post). I'm using the Publish extension task in an Azure DevOps release pipeline with a Windows 2019 agent. Looking at debug logs, I can see that the task runs the command tfx extension publish --json --no-color --service-url https://marketplace.visualstudio.com/ --auth-type pat --token $TOKEN --vsix $VSIX_PATH --debug-log-stream stderr.

This is working fine for one of our publishers, but for another it's failing with You need to be logged in with your Microsoft corporate credentials to perform this action. Publishing works fine with a PAT from a user's ADO account, it's only failing for the service principal's access token. In both cases, I'm getting the access token the exact same way, and the service principal is a Contributor for both publishers. What could be causing this issue?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions