A legal binding agreement, whatever.
I worked as a lawyer for six years; there are extremely strict ethical and legal restrictions around sharing privileged information.
But Microsoft already got all the needed paperwork done to do these things, it isn't like this is some unsolved problem.
https://aws.amazon.com/compliance/hipaa-eligible-services-re...
As you can see, there is much more than zero of them.
Nevertheless, the development of AI jurisprudence will be interesting.
Most company's confidential information is already in their Gmail, or Office 365.