Specifying 'Any scope' when creating claim via API

In the UI, when creating a claim for an authorization server, I can include in “Any Scope” for an access token with a value type of “expression”. How can I do specify “Any Scope” when using the API? The documentation says that the conditions.scope only accepts an array of strings, but how can I make it include any scope? I’m referencing Authorization Server Claims.

Thanks!

Can you try setting the conditions.scopes to an empty array? When I go to create a custom claim within the UI and set it to “Any Scope,” I see a request payload to create the claim like this:

{
    "status":"ACTIVE",
    "name":"any_scope",
    "claimType":"RESOURCE",
    "valueType":"EXPRESSION",
    "value":"\"any\"",
    "group_filter_type":"STARTS_WITH",
    "conditions":{
        "scopes":[]
    },
    "alwaysIncludeInToken":true
}

Ah I see that, I will give that a shot thank you!

Hi andrea, I was able to test this out and it worked, thanks so much

1 Like

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