My project uses an off-the-shelf ACDC converter that conceals design details from such as switching frequency (or SF range). It's 24 V output rated to 5 Amps. I want to measure it's switching frequency but was advised against probing the device with an oscilloscope since it can be dangerous. Any advice how I can accomplish this safely?
This is one way; with a load on the dc power supply output you can examine the ac ripple on a scope. Use a high-pass filter (HPF) that presents a load of 50 to 100 \$\Omega\$ (as shown in the schematic) with a 1:1 oscilloscope probe. You should expect to see 50mV or so.
A pure resistive load on the power supply that will draw at least 50% of its rated output current. If you have an option, do not use a resistor described as "non-inductive".
Follow that with a single-pole, high-pass filter network. I have an old Topaz UPS with a switching frequency of 6 kHz. Assuming your supply is not that, any network above 20 kHz will help isolate the signal you are looking for. 7500 ohms and 1 nF gets you 21 kHz; that seems like a good starting point.
An alternate (or confirming) approach: Something that is a problem when measuring circuit noise can work to your advantage here. A long ground lead and clip on a scope probe can form a loop antenna and mess up conducted noise measurements. That is exactly what you want. Clip a 1K resistor between the probe tip and its ground lead and wave the loop around the supply. Depending on how RFI "tight" are the design and packaging, you might get a usable signal.
Note - All switching power supplies are not based on PWM techniques. With a constant resistive load you probably will find a useable signal and get the operating frequency at those conditions. Pulse Position Modulation and hysteretic control are just two alternative topologies that have operating frequencies that vary with the load.