# Vault github auth teams and policies

**URL:** <https://discuss.hashicorp.com/t/vault-github-auth-teams-and-policies/18393>\
**Category:** Vault\
**Created:** [December 2, 2020, 10:31pm UTC](https://discuss.hashicorp.com/t/vault-github-auth-teams-and-policies/18393 "2020-12-02T22:31:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebadusb](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/ebadusb/32/15270_2.png) [@ebadusb](https://discuss.hashicorp.com/u/ebadusb)\
**Post date:** [December 2, 2020, 10:31pm UTC](https://discuss.hashicorp.com/t/vault-github-auth-teams-and-policies/18393/1 "2020-12-02T22:31:41Z")

</div>

I am following the instructions in the documentation on this subject:

> **[GitHub - Auth Methods | Vault by HashiCorp](https://www.vaultproject.io/docs/auth/github)**
>
> The GitHub auth method allows authentication with Vault using GitHub.

I’ve set token policies at the organization level and when I authenticate using the Github personal access token (PAT) I see those policies, however, my Github user belongs to a team called “development”, and I defined a policy called “protobuilder”. I ran the following:

vault write auth/github/map/teams/development value=protobuilder

Then I logged in as the user in the development team with that user’s PAT  
vault login -method=github  
GitHub Personal Access Token (will be hidden):  
Success! You are now authenticated. The token information displayed below  
is already stored in the token helper. You do NOT need to run “vault login”  
again. Future Vault requests will automatically use this token.

[redacted by admin]

I am not seeing the protobuilder policy assigned. Any idea what I missed?

---

<div class="post-metadata">

**Author:** ![ebadusb](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/ebadusb/32/15270_2.png) [@ebadusb](https://discuss.hashicorp.com/u/ebadusb)\
**Post date:** [December 3, 2020, 12:12am UTC](https://discuss.hashicorp.com/t/vault-github-auth-teams-and-policies/18393/2 "2020-12-03T00:12:45Z")

</div>

Okay, it looks as if the issue was on the Github side. I needed to enable SSO on the PAT. Of course I only got to this after posting here.

---

<div class="post-metadata">

**Author:** ![hsimon-hashicorp](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/hsimon-hashicorp/32/19684_2.png) [@hsimon-hashicorp](https://discuss.hashicorp.com/u/hsimon-hashicorp)\
**Post date:** [June 21, 2022, 8:58pm UTC](https://discuss.hashicorp.com/t/vault-github-auth-teams-and-policies/18393/3 "2022-06-21T20:58:44Z")

</div>

I’m going to go ahead and edit/remove this post, though - you’ve listed some secrets in the OP and we don’t want any harm to come to your org. 🙂
