The Site Admin API should not be necessary - try TDConnection.PolicyStatus.LinkedTemplate
"If the project is a template or is not linked to a template, returns NULL"
"If the project is a template or is not linked to a template, returns NULL"