This type of setup could work, but it requires the correct configuration on the switch port where the phone is connected and the phones to also support the basic protocols. Typically this would have been a computer and a phone. The phone will be on a vlan tag and the computer (printer in your case) untagged in a separate vlan.
If the phone supports lldp-med
https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/802-1x-lldp-med-cli.html
Manual configuration of dual vlan