Skip to content

Token is granted for [YouTrack] and can't be used for 0-0-0-0-0 #116

@dse-copsfs

Description

@dse-copsfs

Expected behavior

Get a list of projects.

Actual behavior

An exception

Response	"{\"error\":\"invalid_token\",\"error_code\":401,\"error_description\":\"Token is granted for [YouTrack] and can't be used for 0-0-0-0-0\",\"error_developer_message\":\"Token is granted for [YouTrack] and can't be used for 0-0-0-0-0\"}"

Steps to reproduce the behavior

  1. Create a new permanent token (scope: YouTrack) for some user of a cloud version (our instance is: https://cops-cz.myjetbrains.com/youtrack)
  2. YouTrackSharp nuget package v. 2021.3.6
  3. Following https://github.com/JetBrains/YouTrackSharp, we tried:
var connection = new BearerTokenConnection("https://cops-cz.myjetbrains.com/youtrack/", "perm:abcdefgh");
var projectsService = connection.CreateProjectsService();
var projects = await projectsService.GetAccessibleProjects();

Please advice us what is the issue.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions