JetBrains / JetBrains/YouTrackSharp
Token is granted for [YouTrack] and can't be used for 0-0-0-0-0
- Dominant language
- C#
- Stars
- 143
- Forks
- 105
- PR merge metrics
- No merged PRs in 30d
Description
## 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)

1. **YouTrackSharp** nuget package v. **2021.3.6**
1. Following https://github.com/JetBrains/YouTrackSharp, we tried:
```C#
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.
Contributor guide
Assessment
This issue has not been assessed yet.