Read and Update MongoDB Atlas Secret value from MongoDB C# driver

Hello,

We have defined SAS token for AZ resource under mongoDB values as a Secret. As obvious SAS token will expire after defined expiry date. We would like to check this expiry from our C# code and update the SAS token if it is about to expire. We are using MongoDB C# driver to connect to MongoDB (https://www.mongodb.com/docs/drivers/csharp/current/)

Is reading and updating MongoDB Secrets is allowed from C# driver? I could not find much details about it. If it is allowed, can i know how can i implement it.

Thank you
Amila