none
Why my token cannot be used and it always return 401 error

    Question

  • I revoke one of my token today which i used to publish my TFS extension. And create a new token to do it. But by using the new one, the command tool:

    tfx extension publish --manifest-globs vss-extension.json

    Always return a 401 error, said "Received response 401 (Not Authorized). Check that your personal access token is correct and hasn't expired. I try to create different token with Marketplace (publish) checked. But still get this 401 error.

    Tuesday, August 30, 2016 1:36 PM

Answers

  • Hi KZhaoMax,

    when creating the PAT (Personal Access Token), please check if select all accessible accounts in the Accounts field dropdown (instead selecting a specific account). You should also set the Authorized Scopes to All scopes for the publish to work.

    For more information, please refer to:

    https://code.visualstudio.com/docs/tools/vscecli

    Best regards,

    Li Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, August 31, 2016 3:27 AM
    Moderator

All replies

  • Hi KZhaoMax,

    when creating the PAT (Personal Access Token), please check if select all accessible accounts in the Accounts field dropdown (instead selecting a specific account). You should also set the Authorized Scopes to All scopes for the publish to work.

    For more information, please refer to:

    https://code.visualstudio.com/docs/tools/vscecli

    Best regards,

    Li Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, August 31, 2016 3:27 AM
    Moderator
  • Thanks Li. it seems I create different accounts by mistake. How to delete a VSTS account in the account home page?
    Wednesday, August 31, 2016 5:01 AM
  • Hi KZhaoMax,

    >>t seems I create different accounts by mistake. How to delete a VSTS account in the account home page?

    Based on your description, it seems that it is related to VSTS, I would suggest that you could post your issue on VSTS for getting a solution.

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=TFService

    Thank you for your understanding.

    Best regards,

    Cole Wu


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Saturday, September 10, 2016 6:44 AM
    Moderator