Questions tagged [clientcredential]
90 questions
11
votes
2 answers
Cant request OAuth2 token for specific scope with Azure AD and Client Credentials flow
We are developing an application with a frontend and a backend. The backend should be accessed via Rest API with an OAuth2 token. Authorization provider is Azure AD.
In Azure we created 2 app registrations. One for the API, one for the client app.…

Peter Petrus
- 699
- 3
- 8
- 15
5
votes
3 answers
How to handle "unsupported_grant_type" from laravel passport
I'm playing around with laravel and try to enable client credentials grant to secure some api endpoints.
To provide some context:
I want to create an api that stands between a database and several websites (and SPAs). So I'll be able to do some…

Matthias
- 3,729
- 22
- 37
4
votes
1 answer
How to specify client-specific custom attribute in access token
I have a Keycloak setup and I'm using the client_credential flow to create access tokens for thousands of back-ends.
I would like to include another custom field in the access token, so next to exp etc., I'd like to have a field publicKey. This…

Jonas Gröger
- 1,558
- 2
- 21
- 35
4
votes
1 answer
Change Password Azure AD B2C
I have been able to create Azure Functions App to manage Azure B2C Users. I can create new users, and update profiles flawlessly using the client_credentials Flow. However, when I change the password using a PATCH request with body:
{
…

Liqteq Developer
- 77
- 7
4
votes
1 answer
How to do IP restrictation for clients in keycloak admin console
I defined a client in keycloak admin console to authorize it with client_credentials flow to call server-to-server api in my application. Everything is fine, i want to apply IP restriction for that client.
Where can i define this restriction in…

Rasool Ghafari
- 4,128
- 7
- 44
- 71
3
votes
1 answer
Token Generation from Azure AD Fails with Error AADSTS9002326
I have Registered two apps in Azure AD; One being the Server and the other being the Client as one set. There are two sets created; One set for Production and the other being for UAT. Client Apps are types of "Web" and none being as SPA.
Production…

hiFI
- 1,887
- 3
- 28
- 57
3
votes
0 answers
Laravel passport - middleware client_credentials bearer token not working
I have a laravel project, use Passport Client Credentials to get Bearer Tokens,
I create client id and secret id using
php artisan passport:client --personal
And get
and get bearer/access code from postman like this
but after call other api like…

Manyang
- 180
- 12
3
votes
1 answer
Spring boot Oauth security - User(custom info) info in the principal in Client Credentials grant type
I'm using "client-credentials" grant type for the rest calls that I make from front-end service to other back-end services. Client-credentials grant type is being used among other back-end services as well. By doing so, I am not able to get who is…

Sharun Thomas
- 31
- 2
2
votes
0 answers
IdentityServer - Client cannot request OpenID scopes in client credentials flow
I have a IdentityServer4 Admin client with Hybrid flow and it is working fine. The Admin client has some controllers (APIs) and I want to expose them as API for other applications. To achieve that I am following this…

Ganu
- 412
- 1
- 4
- 12
2
votes
0 answers
Configure OpenAPI/Swagger to get access_token from Azure AD with client credentials flow
We are trying to configure swagger in our .NET 6 API project so that it automatically retrieves the access_token from Azure token endpoint with "client credentials flow". Here is the configuration part in startup.cs
services.AddSwaggerGen(c =>
{
…

Przemek
- 795
- 8
- 17
2
votes
1 answer
Client Credentials grant with Keycloak as an identity broker for Azure AD
I am trying to use client credentials grant for a back-end service using Keycloak as an identity broker for Azure AD. I also need to store access token from external IdP in Keycloak to retrieve group information from MS Graph API. I have this use…

jnesis
- 101
- 1
- 4
2
votes
0 answers
ITokenAcquisition token refresh and expiration functionality
I'm currently injecting ITokenAcquisition and invoking GetAccessTokenForAppAsync in order to attain an access token from Azure AD.
I've wired it up using AddInMemoryTokenCaches. This is my code from…

Michael McCarthy
- 1,502
- 3
- 18
- 45
2
votes
1 answer
Is there a way to change the Content Type for a Postman OAuth 2 Client Credentials request?
I'm trying to use the built in tool to get an OAuth 2.0 token for my requests. This seems pretty straightforward when reading the documentation and I set it up like this:
The issue is that the request for the token is sent with a content type of…

Neil
- 111
- 2
- 11
2
votes
2 answers
OpenID Connect: How to add custom claims data in the client credential flow
I'm setting up a client credential flow with my identity server to get an access token from a client. I'm able to get the access token with the following code,
Identity server configuration:
public void Configuration(IAppBuilder app)
{
…

Aryan M
- 571
- 3
- 12
- 33
2
votes
1 answer
Identity server issues AuthenticationScheme: Bearer was challenged for a token obtained by client credentials. How to find out the underlying error?
I have trouble authenticating some integration tests requests when working with Identity Server 4 (ASP.NET Core 3.1).
My setup is as follows:
Identity server configuration
public static IEnumerable GetIdentityResources()
{
…

Alexei - check Codidact
- 22,016
- 16
- 145
- 164