# Adding an Action to return Azure AD Groups for a user logging in

**URL:** <https://community.auth0.com/t/adding-an-action-to-return-azure-ad-groups-for-a-user-logging-in/102955>\
**Category:** Get Help\
**Tags:** extensibility, actions-extensibility\
**Created:** [March 20, 2023, 8:56pm UTC](https://community.auth0.com/t/adding-an-action-to-return-azure-ad-groups-for-a-user-logging-in/102955 "2023-03-20T20:56:36Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [March 20, 2023, 10:06pm UTC](https://community.auth0.com/t/adding-an-action-to-return-azure-ad-groups-for-a-user-logging-in/102955/3 "2023-03-20T22:06:07Z")

</div>

Hi @chris392817,

Thanks for reaching out to the Auth0 Community!

> [@chris392817](#):
>
> How do I get these groups into an id\_token with an Action? I’ve seen some old answers using Rules but nothing with Actions.

Unfortunately, it is not possible to get groups in Actions. Instead, you must use Rules to get the top-level IdP attributes.

See [How to access user.groups in Actions?](https://community.auth0.com/t/how-to-access-user-groups-in-actions/84498) for more information.

Please let me know if you have additional questions.  
Thanks,  
Rueben

---

_[View the full topic](https://community.auth0.com/t/adding-an-action-to-return-azure-ad-groups-for-a-user-logging-in/102955)._
