1
votes

I built a project that uses PAT (Personal Access Token) generated by a user to connect to Azure DevOps REST API and get some data about a project and its commits, etc.. It happened to me twice now that the request returns with:

Access Denied: The Personal Access Token used has expired

Even though the token is not expired yet, it's been created two days ago.

Is there any limitation on using this RestAPI which if I exceeded it'll expire my token automatically?

1
I created a new PAT and used it only in one server, this issue did not show again.Dabbas

1 Answers

0
votes

First, you need to check with the user if the PAT has expired, because Expiration can be customized.

enter image description here

If the PAT confirms that it has not expired, you can try to re-create a new PAT, select All accessible organizations and Full access scope , revoke the previous PAT, and see if the new PAT is available.

enter image description here

In this case with the similar issue, a contributor provided a solution : the user was able to fix it by signing out and back in. This seemed to refresh the auth token and unblocked them. You can also try it .