Participant id from prosody

Please tell me from where we can take the “participant id” from prosody . The "participant id " is created by jitsi when new participant joins the meeting . I took from front end and stored in db when meeting starts.

I need to delete it from prosody when user leaves the meeting.

Appreciate your help. Thank you.