Yes, the JTAG USERCODE, which is a 32 bit register that can be used to denote a unique ID for the design. is readable from .sof files.
The USERCODE can be defined in the Quartus® Prime software by going to Assignments -> Device -> Device & Pin Options -> General . Unchecking the Auto Usercode box allows you to enter the unique USERCODE for the .sof file.
To view this information in the generated .sof file, open the file in any text editor and you will find the defined unique code along side the USERCODE string in the header of the file. You can slso read this after loading the .sof file into the Quartus Prime Programmer or in the Compilation report, under Assembler -> Device Options -> JTAG Usercode. Note that the JTAG USERCODE is passed on when creating a .pof or any other programming filefrom the .sof file
When there are multiple .sof files in a design either with variations in code or settings or for different devices in the same JTAG chain, the JTAG USERCODE
register is a useful way to differentiate between the various .sof files before programming the device.