microsoft / appcenter-cli

Command-line Interface (CLI) for Visual Studio App Center
https://appcenter.ms/
MIT License
582 stars 235 forks source link

help: using appcenter-cli with devops pipeline, can't use app API-token #2465

Closed Crare closed 11 months ago

Crare commented 11 months ago

We are trying to run App Center from DevOps pipeline. triggering builds and tests separately is the idea as the build time limit is too short in App Center...

we are running to a error on login with App API-token:

Error: A app API token cannot be used to make requests to this endpoint. Please use a user API token.

using command: appcenter login --token $(appcenter-dev-android-apptoken)

where 'appcenter-dev-android-apptoken' is the android app API-token.

How this could be fixed? As we don't like using user API-token for this as it has too many rights and access to all the apps in App Center and so does the documentation state that it's a bad idea to use it in CI.

MikhailSuendukov commented 11 months ago

Close it as a duplicate of https://github.com/microsoft/appcenter/issues/2219

Crare commented 11 months ago

Close it as a duplicate of microsoft/appcenter#2219

How is it a duplicate? I don't see why it is.

That issue talks about organization wide api token.

I just want the single APP API TOKENS to work in DevOps. Only the USER API TOKEN works, which has too much access rights and is linked to a specific user.

MikhailSuendukov commented 11 months ago

Here https://github.com/microsoft/appcenter/issues/2219#issuecomment-930073192 the user says that APP TOKEN does not work for his task and USER TOKEN has too many rights, and this problem is discussed further

Crare commented 11 months ago

Ah Ok! I may have glanced over it as it's not the original issue poster, it's different opinion and feature that is related to the same token-issue-area. I get it. lets keep the conversation there then.

sanduluca commented 11 months ago

We are also interested in App API Token to upload builds to codepush. We dont want specific user to have an api token.