# When do I create a PAT before or after ShotGrid Migration

**URL:** <https://community.shotgridsoftware.com/t/when-do-i-create-a-pat-before-or-after-shotgrid-migration/12833>\
**Category:** Flow Production Tracking\
**Created:** [July 1, 2021, 8:49pm UTC](https://community.shotgridsoftware.com/t/when-do-i-create-a-pat-before-or-after-shotgrid-migration/12833 "2021-07-01T20:49:17Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![patrick-hubert-adsk](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/patrick-hubert-adsk/32/257_2.png) [@patrick-hubert-adsk](https://community.shotgridsoftware.com/u/patrick-hubert-adsk)\
**Post date:** [July 5, 2021, 4:58pm UTC](https://community.shotgridsoftware.com/t/when-do-i-create-a-pat-before-or-after-shotgrid-migration/12833/7 "2021-07-05T16:58:18Z")

</div>

Hi @mgoetsch

Thanks for posting the image. The `Invalid date` is purely an unfortunate GUI issue. It does not impact the Personal Access Token.

The fact that there is PAT associated to your ShotGrid account means that it will be used. But there is an easy way for you to confirm that (but that will mean generating a new PAT and re-adding it to your user account on ShotGrid)

Here are the steps to confirm that the PAT is indeed used:

1. in the ShotGrid interface, delete the PAT and run your script to confirm it works with your credentials
2. in the [profile.autodesk.com](http://profile.autodesk.com) interface, create a new PAT and copy it to your ShotGrid user
3. once added to ShotGrid, with the `In good standing` message shown, delete it in the [profile.autodesk.com](http://profile.autodesk.com) interface. Do this BEFORE you try to run your script or any other API access with that user.
4. Now that your ShotGrid user refers to a now-deleted PAT, run your script again.

It should fail.

The script will work again if:

- you delete the PAT from your ShotGrid account, or
- create a new PAT in [profile.autodesk.com](http://profile.autodesk.com) and copy it to your ShotGrid account.

Hoping this helps,

-Patrick

---

_[View the full topic](https://community.shotgridsoftware.com/t/when-do-i-create-a-pat-before-or-after-shotgrid-migration/12833)._
