You must have EXECUTE FUNCTION privileges on the function or on the database containing the function.
To invoke a table UDF that takes a UDT argument or returns a UDT, you must have the UDTUSAGE privilege on the SYSUDTLIB database or on the specified UDT.