Answers: <p>Free GitHub does not publicly log detailed information for each personal access token used, such as exact timestamps and accessing IP addresses.</p>
  <p>GitHub Enterprise Cloud and GitHub Enterprise Server, IIRC, do offer this functionality.</p>
  
Answers: CC BY-SA 4.0
Answers: 2024-04-23T09:05:21.133Z
Answers: 2024-04-23T09:05:21.133Z
Answers: Thomas Vincent
Body: <p>A few days ago, I got an email from github saying that a personal access token that we used is in an 'outdated format':</p>
  <blockquote>
  <p>We noticed that an application, TeamCity(ci.support.example.com), owned by an organization you are an admin of, ExampleSolutions, used a token with an outdated format to access the GitHub API on May 19th, 2021 at 17:46 (UTC), with a user-agent header of TeamCity Server 20XX.X.X (build XXXXX).</p>
  </blockquote>
  <p>Looking at the github <a href="https://github.com/settings/tokens" rel="nofollow noreferrer">Personal access tokens page</a> for the user in question, it shows that the token was <em>'Last used within the last 2 weeks'</em>.</p>
  <p>I would like to find logs for the use of the personal access token at the same level of granularity in terms of timestamp and accessing server as are given in the email, so that I can match them against the logs in TeamCity and figure out which build config(s) used the token.</p>
  <p>I've exported the Security log for the owner of the personal access token, as well as the Audit log for the organization. Neither of these show anything relevant on the date and time in question. Are there any logs that I've missed?</p>
  
Comments: CC BY-SA 4.0
Comments: 2023-09-26T20:11:20.447Z
Comments: Were you ever able to find additional logs?
Comments: Jesusaur
Tags: <github><logging><teamcity>
Title: How do I find out exactly when a Github personal access token was last used?
UserDisplayName: Barton Chittenden
ThreadText: # How do I find out exactly when a Github personal access token was last used?
  
  (Asked by: username_0 on 2021-05-25)
  
  A few days ago, I got an email from github saying that a personal access token that we used is in an 'outdated format':
  
  > We noticed that an application, TeamCity(ci.support.example.com), owned by an organization you are an admin of, ExampleSolutions, used a token with an outdated format to access the GitHub API on May 19th, 2021 at 17:46 (UTC), with a user-agent header of TeamCity Server 20XX.X.X (build XXXXX).
  
  Looking at the github [Personal access tokens page](https://github.com/settings/tokens) for the user in question, it shows that the token was *'Last used within the last 2 weeks'*.
  
  I would like to find logs for the use of the personal access token at the same level of granularity in terms of timestamp and accessing server as are given in the email, so that I can match them against the logs in TeamCity and figure out which build config(s) used the token.
  
  I've exported the Security log for the owner of the personal access token, as well as the Audit log for the organization. Neither of these show anything relevant on the date and time in question. Are there any logs that I've missed?
  
  **Tags:** github, logging, teamcity
  
  > **Comments:**
  > **username_1**: Were you ever able to find additional logs?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2024-04-23. Score: 0
  
  Free GitHub does not publicly log detailed information for each personal access token used, such as exact timestamps and accessing IP addresses.
  
  GitHub Enterprise Cloud and GitHub Enterprise Server, IIRC, do offer this functionality.
  
  
  ---
  
  