Open ssmails opened 4 months ago
When you create your cert you can select its lifespan. Once it expires your code will not be able to authenticate until you replace the cert and thumbprint.
Also, what would be the right way to check if the context is valid (just run some basic query on it) ?
And is it preferable to store and reuse the context associated with a site, or recreate as below each time we want to run a query on that site ?
ctx = ClientContext(site_url).with_client_certificate(**cert_credentials)
The reason I ask is because- we may be using this library wrapped into another SDK, where we deal with several sites.
@vgrem Appreciate any help on this -
Is it preferable to store and reuse the context associated with a site, or recreate as below each time we want to run a query on that site ? Does the library provide any mechanism for us to reuse the site context ? If not, and we need to recreate the connection each time, is there any limit from Sharepoint that we should be aware of for the number of allowed connections to a particular site?
@vgrem Appreciate any help on this -
Is it preferable to store and reuse the context associated with a site, or recreate as below each time we want to run a query on that site ? Does the library provide any mechanism for us to reuse the site context ? If not, and we need to recreate the connection each time, is there any limit from Sharepoint that we should be aware of for the number of allowed connections to a particular site?
Hi, did you able to find any answer for this question?
I am using the below with certificates to get the context for a site. Is it accurate to say that the context will expire when the certificate expires ? I don't see any option to explicitly close the context as part of this package. Assuming, as a client of this library, we don't need to close it.
Also, what would be the right way to check if the context is valid (just run some basic query on it) ?