{"meta":{"title":"Granting the migrator role","intro":"The migrator role gives a user or team the ability to run migrations on behalf of an organization.","product":"Migrations","breadcrumbs":[{"href":"/en/migrations","title":"Migrations"},{"href":"/en/migrations/using-github-enterprise-importer","title":"GitHub Enterprise Importer"},{"href":"/en/migrations/using-github-enterprise-importer/migrate-from-gitlab","title":"Migrate from GitLab"},{"href":"/en/migrations/using-github-enterprise-importer/migrate-from-gitlab/grant-the-migrator-role","title":"Migrator role"}],"documentType":"article"},"body":"# Granting the migrator role\n\nThe migrator role gives a user or team the ability to run migrations on behalf of an organization.\n\nTo allow someone other than an organization owner to run a migration or download migration logs, you can grant the migrator role to a user or team.\n\nTo grant the migrator role using the CLI, you can use the GL2GH extension of the GitHub CLI.\n\n1. Install the GitHub CLI.\n   * For installation instructions for GitHub CLI, see the [GitHub CLI repository](https://github.com/cli/cli#installation).\n   * If you already have GitHub CLI installed, run `gh --version` to ensure you're running version 2.4.0 or newer. If you have an older version, visit the [GitHub CLI repository](https://github.com/cli/cli#installation) for upgrade instructions.\n1. Install the GL2GH extension.\n\n   ```shell copy\n   gh extension install github/gh-gl2gh\n   ```\n\n1. The GL2GH extension of the GitHub CLI is updated frequently. To make sure you're using the latest version, update the extension.\n\n    ```shell copy\n    gh extension upgrade github/gh-gl2gh\n    ```\n\n1. On GitHub, create and record a personal access token that has the `admin:org` scope.\n1. Set the personal access token as an environment variable, replacing TOKEN in the commands below with the personal access token you recorded above.\n\n   * If you're using Terminal, use the `export` command.\n\n      ```shell copy\n      export GH_PAT=\"TOKEN\"\n      ```\n\n   * If you're using PowerShell, use the `$env` command.\n\n      ```shell copy\n      $env:GH_PAT=\"TOKEN\"\n      ```\n1. Use the `gh gl2gh grant-migrator-role` command, replacing ORGANIZATION with the organization you want to grant the migrator role for, ACTOR with the user or team name, and TYPE with `USER` or `TEAM`.\n\n   ```shell copy\n   gh gl2gh grant-migrator-role --github-org ORGANIZATION --actor ACTOR --actor-type TYPE\n   ```\n\n   >[!NOTE] If you're granting the migrator role for GHE.com, you must also include the target API URL for your enterprise's subdomain. For example: `--target-api-url https://api.octocorp.ghe.com`."}