We want to use PSU to read / write encrypted columns in several SQL tables, that can then be exposed as an API endpoint.
SQL AlwaysEncrypted is based on certificates, which grants the user access to the clear text data.
Long story short, if i execute this code as an script (both Integrated and specific Powershell versions) it returns the certificate.
But if i execute it as an API endpoint, no data is returned and it just hangs for several minutes.
Fx:
That is not by design. It could be the automatic JSON conversion. The ConvertTo-Json cmdlet has an issue where objects that are complex can cause it to hang.
It would be an good idea to set an default timeout limit, but also let us define / override one.
We have APIs that contact several systems, and it takes approx 10 minutes to query it all - would be annoying, if the hardcoded limit closed the session