# Can You Grant an Access Token on Behalf of an Organisation?

**URL:** <https://community.auth0.com/t/can-you-grant-an-access-token-on-behalf-of-an-organisation/82720>\
**Category:** Get Help\
**Created:** [May 2, 2022, 6:44am UTC](https://community.auth0.com/t/can-you-grant-an-access-token-on-behalf-of-an-organisation/82720 "2022-05-02T06:44:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aidan.temple](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/aidan.temple/32/37026_2.png) [@aidan.temple](https://community.auth0.com/u/aidan.temple)\
**Post date:** [May 2, 2022, 6:44am UTC](https://community.auth0.com/t/can-you-grant-an-access-token-on-behalf-of-an-organisation/82720/1 "2022-05-02T06:44:46Z")

</div>

Is it possible in Auth0 to have a user grant access to a third party on behalf of an organisation?

We’ve tried using the Authorization Code flow with the organisation parameter. But the resulting token is for a user, not for an organisation. This distinction is important in our application because we want to allow multiple users to manage this integration. In the current prototype, we run into the problem that when a user leaves the organisation, the integration is no longer valid since the access token is for the user, not the organisation.

We like the Authorization Code flow since it contains the consent prompt for the user and is an open standard that is easy for third parties to implement. We are open to other OAuth 2.0 flows but would like to keep it as close to the standard as possible.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [May 16, 2022, 10:09pm UTC](https://community.auth0.com/t/can-you-grant-an-access-token-on-behalf-of-an-organisation/82720/3 "2022-05-16T22:09:07Z")

</div>

Hey there @aidan.temple sorry for the delayed response, and welcome to the community!

> [@aidan.temple](#):
>
> Is it possible in Auth0 to have a user grant access to a third party on behalf of an organisation?

I don’t believe this is possible 😕

> [@aidan.temple](#):
>
> We’ve tried using the Authorization Code flow with the organisation parameter. But the resulting token is for a user, not for an organisation.

While I’m not totally clear on your case, it sounds like you might be interested in [Role-Based Access Control](https://auth0.com/docs/manage-users/access-control/rbac) (RBAC) - Basically, you could create a role, assign it to users, and if a user does leave the organization you remove the role. It’s pretty straightforward to add a user’s roles to a token, see [this post](https://community.auth0.com/t/setting-a-user-role-in-an-action-will-not-update-the-permissions-in-the-access-token/70867/2).  
[https://auth0.com/docs/manage-users/organizations/configure-organizations/add-member-roles](https://auth0.com/docs/manage-users/organizations/configure-organizations/add-member-roles)

Hopefully this at least gives you something to work with!

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [May 31, 2022, 10:09pm UTC](https://community.auth0.com/t/can-you-grant-an-access-token-on-behalf-of-an-organisation/82720/4 "2022-05-31T22:09:19Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
