# Rules not working in machine to machine applications

**URL:** <https://community.auth0.com/t/rules-not-working-in-machine-to-machine-applications/84168>\
**Category:** Get Help\
**Tags:** event, rules, access-token, machine-to-machine\
**Created:** [May 27, 2022, 11:21am UTC](https://community.auth0.com/t/rules-not-working-in-machine-to-machine-applications/84168 "2022-05-27T11:21:49Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![jpm-homebug](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jpm-homebug/32/20203_2.png) [@jpm-homebug](https://community.auth0.com/u/jpm-homebug)\
**Post date:** [May 31, 2022, 3:43pm UTC](https://community.auth0.com/t/rules-not-working-in-machine-to-machine-applications/84168/5 "2022-05-31T15:43:25Z")

</div>

I tried adding the email address as a custom claim according to [Guide: Migrate your custom Rules to Auth0 Actions](https://community.auth0.com/t/guide-migrate-your-custom-rules-to-auth0-actions/68915), but that did not work. I believe I am hitting this same issue described here.

My SPA uses the Auth0 SPA library to do authentication. That library provides an access token for API calls to my backend. This access token does not seem to contain the custom claim (email address).

I do not want to do a call to auth0 from my backend every time an api endpoint on my backend is called as that is not scalable. What is the appropriate method of obtaining the email address of a user on my backend?

---

_[View the full topic](https://community.auth0.com/t/rules-not-working-in-machine-to-machine-applications/84168)._
