# Best Practices for Microservices: Creating Passwordless Users via M2M API

**URL:** <https://community.auth0.com/t/best-practices-for-microservices-creating-passwordless-users-via-m2m-api/182827>\
**Category:** Dev to Dev Hub\
**Tags:** apis, application\
**Created:** [February 25, 2025, 12:55pm UTC](https://community.auth0.com/t/best-practices-for-microservices-creating-passwordless-users-via-m2m-api/182827 "2025-02-25T12:55:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevin.schmitt.upjv](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@kevin.schmitt.upjv](https://community.auth0.com/u/kevin.schmitt.upjv)\
**Post date:** [February 25, 2025, 12:55pm UTC](https://community.auth0.com/t/best-practices-for-microservices-creating-passwordless-users-via-m2m-api/182827/1 "2025-02-25T12:55:54Z")

</div>

Hello all,

We currently have an architecture where multiple front-end applications connect to an API Gateway that in turn redirects to other APIs (e.g. a “Stage” API).

My question is the following regarding the structuring in Auth0:

For front-ends:  
Should we create an Auth0 application for each front-end?

For backend APIs:  
Should an Auth0 API correspond to each API (e.g. Stage API)?

Or should we declare a single Auth0 API for the API Gateway, and all other APIs would use the credentials of this API?

In addition, our APIs must be able to create users passwordless.

Is it possible, with the Auth0 PHP SDK, to create a user in passwordless mode via M2M communication?

If not possible, what solution could meet this current need?

Thank you very much for your feedback!

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [February 25, 2025, 3:21pm UTC](https://community.auth0.com/t/best-practices-for-microservices-creating-passwordless-users-via-m2m-api/182827/3 "2025-02-25T15:21:29Z")

</div>

Hi @kevin.schmitt.upjv

Welcome to the Auth0 Community!

> Should we create an Auth0 application for each front end?

It’s a good practice to create a separate application in Auth0 for each of your frontends, as they will probably have a different configuration.

> For backend APIs:  
> Should an Auth0 API correspond to each API (e.g. Stage API)?
> 
> Or should we declare a single Auth0 API for the API Gateway, and all other APIs would use the credentials of this API?

Currently, we don’t support multiple Audiences, so in this case, it would be best to create an API for the API Gateway and manage it with scopes, with a single audience that will point to the API Gateway.

> In addition, our APIs must be able to create users passwordless.

If you enable the passwordless connection for your M2M application but leave Grant Type to Client Credentials Only, you will be able to create a user for passwordless with Management API → the connection parameter will be “email.”

[https://community.auth0.com/t/how-to-specify-multiple-audiences/10830](https://community.auth0.com/t/how-to-specify-multiple-audiences/10830)

Thanks  
Dawid

---

<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:** [March 14, 2025, 8:12am UTC](https://community.auth0.com/t/best-practices-for-microservices-creating-passwordless-users-via-m2m-api/182827/5 "2025-03-14T08:12:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![remus.ivan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/remus.ivan/32/68771_2.png) [@remus.ivan](https://community.auth0.com/u/remus.ivan)\
**Post date:** [September 5, 2025, 8:36pm UTC](https://community.auth0.com/t/best-practices-for-microservices-creating-passwordless-users-via-m2m-api/182827/6 "2025-09-05T20:36:13Z")

</div>


