# How to define Scope on API login using Machine to Machine app

**URL:** <https://community.auth0.com/t/how-to-define-scope-on-api-login-using-machine-to-machine-app/20278>\
**Category:** Get Help\
**Tags:** userinfo, scope, machine-to-machine\
**Created:** [January 21, 2019, 11:49am UTC](https://community.auth0.com/t/how-to-define-scope-on-api-login-using-machine-to-machine-app/20278 "2019-01-21T11:49:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidr1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/davidr1/32/10289_2.png) [@davidr1](https://community.auth0.com/u/davidr1)\
**Post date:** [January 21, 2019, 11:49am UTC](https://community.auth0.com/t/how-to-define-scope-on-api-login-using-machine-to-machine-app/20278/1 "2019-01-21T11:49:54Z")

</div>

I’m implementing an authentication challenge in an [Apple Business Chat conversation](https://developer.apple.com/documentation/businesschat/enhancing_the_customer_s_user_experience/sending_an_authentication_message)  
I’m using a Machine to Machine app with the management API.  
Apple calls the authorize endpoint with the client ID of my Auth0 App - this present the Auth0 login screen.  
User inputs credentials and then the **oauth/token** endpoint is called and an Access Token is returned to the “Agent” side.  
On the Agent side, I have an app that calls **/userinfo** with the Access Token, but all I get in return is **{}**

I’ve been reading that I need to define the scope - where do I define this? Is it in the **oauth/token** call to Auth0 made by Apple?

---

<div class="post-metadata">

**Author:** ![davidr1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/davidr1/32/10289_2.png) [@davidr1](https://community.auth0.com/u/davidr1)\
**Post date:** [January 22, 2019, 12:29pm UTC](https://community.auth0.com/t/how-to-define-scope-on-api-login-using-machine-to-machine-app/20278/2 "2019-01-22T12:29:27Z")

</div>

So I removed the OIDC Conformant option from the application (can be found under Advance Setting\>\>OAuth)  
Now I get a response will all user data and meta data. Not sure this is the right approach but it works…

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [August 29, 2019, 9:11am UTC](https://community.auth0.com/t/how-to-define-scope-on-api-login-using-machine-to-machine-app/20278/3 "2019-08-29T09:11:55Z")

</div>

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