Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCI CLI script fails for filter clause to get the user who did not logged in since last 6 months #851

Open
amolchinchore18 opened this issue Oct 3, 2024 · 0 comments
Labels
IAM Issue pertains to the IAM service

Comments

@amolchinchore18
Copy link

six_months_ago=$(date -u -d "-6 months" +"%Y-%m-%dT%H:%M:%SZ")

oci identity-domains users list --endpoint $DOMAIN_NAME --attribute-sets 'all' --query 'data.resources[].{UserName:"user-name", IsActive: active, DisplayName: "display-name", LoginDates: "urn-ietf-params-scim-schemas-oracle-idcs-extension-user-state-user"."last-successful-login-date",Created: "meta"."created"}' --filter '"urn-ietf-params-scim-schemas-oracle-idcs-extension-user-state-user"."last-successful-login-date" lt "'"$six_months_ago"'"'

"client_version": "Oracle-PythonSDK/2.134.0, Oracle-PythonCLI/3.48.0",
"code": null,
"detail": "Invalid filter, Syntax error at position 0",
"logging_tips": "Please run the OCI CLI command using --debug flag to find more debug information.",
"message": "The service returned error code 400",
"opc-request-id": "39B2CF00A8964ED289C177CC4167F850/FWlc002pAE0000000",
"operation_name": "list_users",
"request_endpoint": "GET https://idcs-72b8b71d662841b581d9d786e5ab9c2e.identity.oraclecloud.com/admin/v1/Users",
"schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error",
    "urn:ietf:params:scim:api:oracle:idcs:extension:messages:Error"
],
"status": 400,
"target_service": "identity_domains",
"timestamp": "2024-10-03T08:47:56.173872+00:00",
"troubleshooting_tips": "See [https://docs.oracle.com/iaas/Content/API/References/apierrors.htm] for more information about resolving this error. If you are unable to resolve this issue, run this CLI command with --debug option and contact Oracle support and provide them the full error message.",
"urn:ietf:params:scim:api:oracle:idcs:extension:messages:_error": {
    "messageId": "Invalid filter, Syntax error at position 0"
}
@anup-21 anup-21 added the IAM Issue pertains to the IAM service label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IAM Issue pertains to the IAM service
Projects
None yet
Development

No branches or pull requests

2 participants