Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
yan.gauthier
in reply to: Formsprag

you don't need to link to vault, you can simply create a connection to the vault server.

using Autodesk.Connectivity.WebServicesTools;

 ServerIdentities server = new ServerIdentities();
            server.DataServer = "000.000.000.000"; //Server Address
            server.FileServer = "000.000.000.000"; //Server Address
            UserPasswordCredentials login = new UserPasswordCredentials(server, "Vault", "Administrator", "", true); //True for ReadOnly
            
            using (WebServiceManager serviceManager = new WebServiceManager(login))
            {
                Folder root = serviceManager.DocumentService.GetFolderRoot();
                //Find latest version of the file in the vault
                Autodesk.Connectivity.WebServices.File[] file = serviceManager.DocumentService.FindFilesBySearchConditions();
            }

 

Otherwise, this method should also work

 

using VDF = Autodesk.DataManagement.Client.Framework;

            VDF.Vault.Results.LogInResult logInResult = VDF.Vault.Library.ConnectionManager.LogIn
                (
                    //Server,
                    //VaultName,
                   //UserName,
                    //Password,
                    VDF.Vault.Currency.Connections.AuthenticationFlags.Standard,
                    null
                );

if (logInResult.Success)
            {
                VDF.Vault.Currency.Connections.Connection connection = logInResult.Connection;
                Autodesk.Connectivity.WebServices.File[] file = connection.WebServiceManager.DocumentService.FindFilesBySearchConditions();

            }