Users having a Named User license and working with a custom web application, can now login into Vault with their Named User license, with the existing Standard / Windows authentication.
With the Vault 2021.2 update onwards, the LogInWithUserLicense() method was added to support this workflow.
The sample code syntax for this method would be similar to:
VDF.Vault.Results.LoginResult results = VDF.Vault.Library.ConnectionManager.LogInWithUserLicense(
tbServerName.Text, tbVaultName.Text, tbUserName.Text, tbPassword.Text, Token, VDF.Vault.Currency.Connections.AuthenticationFlags.Standard, null);
m_conn = results.Connection;
The above method takes in an additional input parameter "Token". You can refer to the Forge documentation on how to generate this token:
The Vault SDK also contains a ready to compile sample that demonstrates this workflow. On a default installation of Vault, you can find it here:
C:\Program Files\Autodesk\Autodesk Vault 2022 SDK\VS19\CSharp\WebAppUserLicense
Do take a look at the included Readme.txt file that contains additional details to help build and run this sample.