I doubt it's harmful, not sure if they can carry parasites though. You can DIY fruit fly traps. Plastic, foam, jar, whatever and put some apple cider vinegar in the bottom. Cover the top with sandwich bag or plastic wrap. Poke holes in the top. They are good on getting in back can't really get out. Can place outside, around the viv.
Ooo I hate fruit flies! Get them all the time with the snails, annoying blighters! We've found if we leave like greasy washing up they'll drown in that, or just any standing body of water... We also have to do daily veg and soil changes (for snails) which helps, not sure if that's of any use to beardies though? Hope you can deal with them thy can get annoying! X