USB on STM32F107RCT and Stm32CubeMX
Even though the device is self-powered, you still need to connect the USB's Vbus (pin 1) to the microcontroller's OTG_FS_VBUS (pin PA9).

This isn't to provide power, but to allow the microcontroller to know when to start up the USB subsystem.