Identityserver4: Invalid_scope when no scope specified for client credentials flow

Created on 5 Jan 2018  路  3Comments  路  Source: IdentityServer/IdentityServer4

According to:
https://leastprivilege.com/2016/09/14/new-in-identityserver4-default-scopes/

However, when I do not pass a scope, I get an invalid scope error? My client config looks like this:

ClientId = apiClientMeta.ClientId,
// no interactive user, use the clientid/secret for authentication
AllowedGrantTypes = GrantTypes.ClientCredentials,
// scopes that client has access to
AllowedScopes = { "consapi", "custapi" },
ClientSecrets = secretes,
AllowAccessTokensViaBrowser = true,
RedirectUris = someuri,
PostLogoutRedirectUris = someuri,
AllowedCorsOrigins = true,
RequireConsent = false,
AlwaysIncludeUserClaimsInIdToken = true,
AccessTokenType = AccessTokenType.Jwt, //Always
AlwaysSendClientClaims = true

My APIResources:
ApiResource apiResource = new ApiResource("consapi", "Consultant API");
apiResources.Add(apiResource);
ApiResource apiResource2 = new ApiResource("custapi", "Customer API");
apiResources.Add(apiResource2);

I need to be able to get all of the AllowedScopes back for multiple API access, unless there's another way to do it.

core question

All 3 comments

All set on this issue -- can we close?

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings