Skip to content

bug: received error from Okta API: err: json: cannot unmarshal string into Go struct field #17348

@tpunith

Description

@tpunith

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

While fetching data from Okta, getting error - ERR table resolver finished with error error="received error from Okta API: err: json: cannot unmarshal string into Go struct field _AppUser.profile of type map[string]interface {}, body:
ERR table resolver finished with error error="received error from Okta API: err: json: cannot unmarshal array into Go struct field _ApplicationGroupAssignment.profile of type map[string]interface {}
There are about 31 errors like this. Using okta plugin 4.1.5
Errors are in module=okta-source table=okta_application_users & table=okta_application_group_assignments

Expected Behavior

Able to fetch data from Okta using this tool

CloudQuery (redacted) config

kind: source
spec:
  # Source spec section
  name: okta
  path: cloudquery/okta
  registry: cloudquery
  version: "v4.1.5"
  tables: ["*"]
  destinations: ["postgresql"]
  spec:
    # required, Okta domain name, for example: https://example.okta.com, https://example.okta-emea.com,  https://example.oktapreview.com
    domain: "https://<host>.okta.com"
    # required, Okta Token to access API
    token: <token>
kind: destination
spec:
  name: "postgresql"
  path: "cloudquery/postgresql"
  registry: "cloudquery"
  version: "v7.6.0"

  spec:
    connection_string:  "${POSTGRESQL_CONNECTION_STRING}" # set the environment variable in a format like postgres://postgres:pass@localhost:5432/postgres?sslmode=disable

Steps To Reproduce

Run sync with Okta & postgres yml files

CloudQuery (redacted) logs

2024-03-26T18:21:08Z ERR table resolver finished with error error="received error from Okta API: err: json: cannot unmarshal string into Go struct field _AppUser.profile of type map[string]interface {}, body: \"[{<json>}] module=okta-source table=okta_application_users

CloudQuery version

7.6.0

Additional Context

No response

Pull request (optional)

  • I can submit a pull request

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions