# Is there any way to authorise requests from two separate Client credentials in a single API

**URL:** <https://community.auth0.com/t/is-there-any-way-to-authorise-requests-from-two-separate-client-credentials-in-a-single-api/105531>\
**Category:** Get Help\
**Created:** [April 26, 2023, 6:15am UTC](https://community.auth0.com/t/is-there-any-way-to-authorise-requests-from-two-separate-client-credentials-in-a-single-api/105531 "2023-04-26T06:15:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anju.gopinath](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@anju.gopinath](https://community.auth0.com/u/anju.gopinath)\
**Post date:** [April 26, 2023, 6:15am UTC](https://community.auth0.com/t/is-there-any-way-to-authorise-requests-from-two-separate-client-credentials-in-a-single-api/105531/1 "2023-04-26T06:15:19Z")

</div>

We have two applications (windows service). These applications are accessing a custom standalone web API. Our requirement is, these two applications needs to be authorized while calling the Web API methods. App1 calls API\_Method1() and App2 calls API\_Method2(). Auth0 client credentials flow is used for this purpose. Separate client credentials has been configured for these two applications.

Authorization flow is as below.

Client application calls Auth0 token endpoint (by providing ClientId & secret).  
Client application receives token.  
Client application invokes Web API method and passes token along with.  
Web API validates token and executes method.

For implementing Authorization (using Microsoft.AspNetCore.Authentication.JwtBearer), we have to configure Authority and Audience. Authority is same for both. But since Audience is different for each and configuration is done on API startup, API can be configured to authorize only one of the applications.

Is there any way to authorize requests from two separate Client credentials in a single API.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [May 2, 2023, 11:27pm UTC](https://community.auth0.com/t/is-there-any-way-to-authorise-requests-from-two-separate-client-credentials-in-a-single-api/105531/3 "2023-05-02T23:27:41Z")

</div>

Hey there @anju.gopinath !

Thanks for the detailed description of the issue 🙂

> [@anju.gopinath](#):
>
> For implementing Authorization (using Microsoft.AspNetCore.Authentication.JwtBearer), we have to configure Authority and Audience. Authority is same for both. But since Audience is different for each and configuration is done on API startup, API can be configured to authorize only one of the applications.
> 
> Is there any way to authorize requests from two separate Client credentials in a single API.
> 
> Assigned topic to [tyf](https://community.auth0.com/u/tyf/activity/assigned)

While I’m not entirely sure why this requires 2 separate audiences (it’s the same API, right?), you may want to look into using a single logical API.

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

Let us know!

---

<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:** [May 26, 2023, 11:29pm UTC](https://community.auth0.com/t/is-there-any-way-to-authorise-requests-from-two-separate-client-credentials-in-a-single-api/105531/4 "2023-05-26T23:29:59Z")

</div>

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