Skip to content

'update_detects_by_ids' returns "Failed to validate resource" #527

Answered by jshcodes
jartigag asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @jartigag!

You'll need to lookup the UUID for the user you want to assign this to first. Try the following and let us know what you get back.

from falconpy import OAuth2, Detects, UserManagement

auth = OAuth2(client_id="CLIENT_ID_HERE", client_secret="CLIENT_SECRET_HERE")
detects = Detects(auth_object=auth)
users = UserManagement(auth_object=auth)

user_detail = users.retrieve_user_uuid(uid="a_valid_user_email@company.com")
if user_detail["status_code"] != 200:
    raise SystemExit(f"User UUID not retrieved: {user_detail['body']['errors'][0]['message']}")

user_uuid = user_detail["body"]["resources"][0]  # Should only be the one

# Now that we have the UUID, we should be able to assig…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@jartigag
Comment options

Comment options

You must be logged in to vote
5 replies
@jartigag
Comment options

@jshcodes
Comment options

@jartigag
Comment options

@jshcodes
Comment options

@jartigag
Comment options

Answer selected by jartigag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
detects Detections issues and questions user management User Management issues and questions API usage General API usage issues and questions
2 participants