internal static bool DisconnectProvidedService(PnPConnection connection) { //connection.ClearTokens(); Environment.SetEnvironmentVariable("PNPPSHOST", string.Empty); Environment.SetEnvironmentVariable("PNPPSSITE", string.Empty); if (connection == null) { return(false); } //GraphToken.ClearCaches(); //OfficeManagementApiToken.ClearCaches(); GenericToken.ClearCaches(); connection.Context = null; connection = null; return(true); }