PowerPlatform-DataverseServiceClient
                                
                                 PowerPlatform-DataverseServiceClient copied to clipboard
                                
                                    PowerPlatform-DataverseServiceClient copied to clipboard
                            
                            
                            
                        Service Client is not reusing an existing connection
It seems like every time a new ServiceClient is returning a new connection (re-login to D365), although we have passed RequireNewInstance=false in the connection string, which uses client and secret.
It doesn't happen in the old .Net SDK. Below are traces for the different queries initiated from a Function App (different sessions and different method calls).

Thanks for your report,
We will take a look at this.
@kwu022 , we have identified a bug in this behavior that would cause this pattern fault if the previous connection was disposed. We are going to move to a newer pattern for this:
if a connection is created to an instance with use unique = false, then disposed. then the next connection contains use unique = false, will run the 'restart' behavior to connect to the instance,
if a connection is created to an instance with use unique = false, then the next connection contains use unique = false, we will reuse the settings from the first connection.
Note, this default behavior for use unique is 'true'.