# APIs and permissions from M2M vs regular applications

**URL:** <https://community.auth0.com/t/apis-and-permissions-from-m2m-vs-regular-applications/55461>\
**Category:** Get Help\
**Created:** [December 29, 2020, 3:36pm UTC](https://community.auth0.com/t/apis-and-permissions-from-m2m-vs-regular-applications/55461 "2020-12-29T15:36:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![trondhindenes](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/trondhindenes/32/6352_2.png) [@trondhindenes](https://community.auth0.com/u/trondhindenes)\
**Post date:** [December 29, 2020, 3:36pm UTC](https://community.auth0.com/t/apis-and-permissions-from-m2m-vs-regular-applications/55461/1 "2020-12-29T15:36:17Z")

</div>

Hi,  
When creating a API in auth0, I have the option of allowing other M2M applications to authenticate to it via the “Machine to Machine applications” tab.  
However, it looks that for regular “Application” type applications, all of these are allowed access by default.

I know that I can lock this down via permission scopes, but I feel like that’s overkill - a simple “yes/no” choice so that only “app A” is allowed to authenticate to “API a”, while “app B” is not allowed is all I need.

Is there some hidden Auth0 functionality I’m missing that lets me accomplish this?

regards,  
Trond Hindenes

---

<div class="post-metadata">

**Author:** ![colin.coutts](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/colin.coutts/32/17217_2.png) [@colin.coutts](https://community.auth0.com/u/colin.coutts)\
**Post date:** [December 29, 2020, 10:49pm UTC](https://community.auth0.com/t/apis-and-permissions-from-m2m-vs-regular-applications/55461/2 "2020-12-29T22:49:31Z")

</div>

Hi @trondhindenes and thanks for reaching out!

> [@trondhindenes](#):
>
> it looks that for regular “Application” type applications, all of these are allowed access by default.

If possible would you be able to supply me with a screenshot of what you mean here or supply a bit more detail?

Best Regards,  
Colin

---

<div class="post-metadata">

**Author:** ![trondhindenes](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/trondhindenes/32/6352_2.png) [@trondhindenes](https://community.auth0.com/u/trondhindenes)\
**Post date:** [December 29, 2020, 11:00pm UTC](https://community.auth0.com/t/apis-and-permissions-from-m2m-vs-regular-applications/55461/3 "2020-12-29T23:00:07Z")

</div>

Hi,  
sorry for being unclear.

Lets say that I have two APIs, api-a, and api-b. If I navigate to the “Machine to Machine applications” tab on api-a, I can chose wether or not api-b has access to it.

However, I also have a vue.js app, represented by an auth0 application called “frontend-a”.

I’m looking for the simplest possible way to control which api’s “frontend-a” is allowed to call - it seems that if I don’t do anything it can grab a valid access token for both api-a and api-b and I don’t necessarily want to allow that.

Hopefully that makes it a bit clearer? I’d rather not post screenshots in public since they’re full of app names, client ids and other things we’re hesitant to share.

---

<div class="post-metadata">

**Author:** ![colin.coutts](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/colin.coutts/32/17217_2.png) [@colin.coutts](https://community.auth0.com/u/colin.coutts)\
**Post date:** [December 29, 2020, 11:17pm UTC](https://community.auth0.com/t/apis-and-permissions-from-m2m-vs-regular-applications/55461/4 "2020-12-29T23:17:09Z")

</div>

Hi @trondhindenes,

I think that makes some more sense thanks, the `Machine To Machine Applications` tab will show both M2M and Regular Web Applications which can be explicitly authorized to use an API. In that section, there’s a bit of text that I think hints at what you’re describing:

“Single Page and Native apps do not require further configuration. SPAs can execute the [Implicit Grant](https://auth0.com/docs/api-auth/grant/implicit) to access APIs while Native Apps can do [Authorize Code with PKCE](https://auth0.com/docs/api-auth/grant/authorization-code-pkce) for the same purpose.”

If you’d like to restrict access to an API based on a certain application, you could likely do so in a [Rule](https://auth0.com/docs/authorization/sample-use-cases-rules-with-authorization#deny-access-to-anyone-calling-an-api). That link details returning an error if an `audience` parameter is detected however it could be updated to suit your needs. However, you could just leave the `audience` parameter out of your call to begin the login flow (‘/authorize’) so Auth0 wouldn’t return an Access Token that could be used for your API.

Best Regards,  
Colin

---

<div class="post-metadata">

**Author:** ![trondhindenes](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/trondhindenes/32/6352_2.png) [@trondhindenes](https://community.auth0.com/u/trondhindenes)\
**Post date:** [December 29, 2020, 11:38pm UTC](https://community.auth0.com/t/apis-and-permissions-from-m2m-vs-regular-applications/55461/5 "2020-12-29T23:38:48Z")

</div>

> [@colin.coutts](#):
>
> tab will show both M2M and Regular Web Applications which can be explicitly authorized to use an API

That’s not what I’m seeing. I’m only seeing M2M applications (APIs), not regular web applications (what Auth0 calls an “application”).

I guess I’m finding it strange that for between M2M apps (APIs) the default is “no access” while between Web Applications and M2M apps (APIs) it seems that I have to use rules to “lock them down” as the default is seemingly wide open - In any web application I can use the client id and the configured audience of the desired M2M app (API) to get access without any explicitly configuring that.

From your reply it seems like I should be seeing both web apps and M2M apps in the “Machine to Machine applications” tab and thus be able to control access from there, but I don’t - I only see other M2M (api) apps.

---

<div class="post-metadata">

**Author:** ![kchang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kchang/32/28811_2.png) [@kchang](https://community.auth0.com/u/kchang)\
**Post date:** [April 15, 2021, 12:46pm UTC](https://community.auth0.com/t/apis-and-permissions-from-m2m-vs-regular-applications/55461/6 "2021-04-15T12:46:31Z")

</div>

did you find an answer to the question?  
While configuring Auth0, I also ended up having the same question which seems to be very strange.

---

<div class="post-metadata">

**Author:** ![kchang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kchang/32/28811_2.png) [@kchang](https://community.auth0.com/u/kchang)\
**Post date:** [April 15, 2021, 2:11pm UTC](https://community.auth0.com/t/apis-and-permissions-from-m2m-vs-regular-applications/55461/7 "2021-04-15T14:11:04Z")

</div>

I think I kinda get the answer.  
So I think the audience check will have to be done on the service/API side as part of token validation.
