Providing multiple strategies when retrieving Connection list

Please include the following information in your post:

  • Which SDK this is regarding:
  • SDK Version: Golang v0.10.1
  • Platform Version: Latest?
  • Code Snippets/Error Messages/Supporting Details/Screenshots:

Is this a feature request or bug report? If so, please create an issue directly in the corresponding GitHub repo. The Community SDK category is for general discussion and support.

I am unable to provide multiple strategies when querying the Connection List API.
I’ve tried this using the Golang API as well as the Auth0 Management API in the Browser here: Auth0 Management API v2

/api/v2/connections?strategy=github&strategy=google-oauth2

If I specify both here, it only returns the first one.
If I try comma delimiting, I get a 400 Bad Request

/api/v2/connections?strategy=github&strategy=google-oauth2
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Query validation error: 'Invalid value \"github,google-oauth2\"' on property strategy[0].",
  "errorCode": "invalid_query_string"
}

Golang example:

client.Connection.List(management.Parameter("strategy", "google-oauth2,github"))

The documentation states that I should be able to provide an array(string)
image

What is the correct format here?

Hey there @nick18!

I apologize for the delayed response here - I just tested this out myself using go-Auth0 and am experiencing the same thing.

I think it’s a known issue that multiple strategies won’t work in the Management API Explorer (annoying), but I was able to filter based on multiple strategies in Postman like: https://{{auth0_domain}}/api/v2/connections?strategy=auth0&strategy=google-oauth2

I just opened up a discussion internally to see if this is possible in the Go SDK - I’ll keep you posted!

1 Like

Hey @nick18 following up here - After some research on our end it seems as though this is a known issue with the endpoint itself. Basically, it only accepts params like strategy=auth0&strategy=google-oauth2 which is not currently supported by any of our SDKs. This is on the roadmap, however I’m not able to provide any sort of time frame and the only workaround I can recommend for now is getting all connections, and filtering on the strategies in your Go code itself.

I definitely recommend creating a feedback request as the more interest there is in adding this feature from the community the better!

1 Like

Thanks for the response here @tyf ! Glad to know this is an issue and not just me :sweat_smile:.
The workaround you suggested is what I ended up going with.

I’ll definitely create a feedback request.

EDIT: feedback request can be found here: Support filtering by multiple strategies in Management Connections API in Go SDK

1 Like

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