Get proxy admin of a proxy contract

Hello there,

I have a proxy contract (TransparentUpgradeableProxy), is there anyway the contract itself get the proxy admin of it?

By "the contract itself" do you mean the implementation code? You can copy this function from ERC1967Upgrade: