<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic PowerShell - Authenticating using Windows credentials in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/powershell-authenticating-using-windows-credentials/m-p/9700529#M3753</link>
    <description>&lt;P&gt;Has anyone any experience of connecting to Vault via PowerShell, but using Windows credentials?&lt;/P&gt;&lt;P&gt;For example, the following code throws an error "New-Object : Exception calling ".ctor" with "1" argument(s): "311""&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
[System.Reflection.Assembly]::LoadFrom('C:\Program Files (x86)\Autodesk\Autodesk Vault 2019 SDK\bin\x64\Autodesk.Connectivity.WebServices.dll')
$serverID = New-Object Autodesk.Connectivity.WebServices.ServerIdentities
   $serverID.DataServer = "MYSERVER"
   $serverID.FileServer = "MYSERVER"
  $VaultName = "MYVAULT"

  $cred = New-Object Autodesk.Connectivity.WebServicesTools.UserPasswordCredentials ($serverID, $VaultName, $true)
  $vault = New-Object Autodesk.Connectivity.WebServicesTools.WebServiceManager($cred)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only thing I found online was this &lt;A href="https://github.com/miwaniza/Autodesk_Vault_Programmers_Cookbook/blob/master/2.%20Login/1.3.%20Windows%20Authentication/Login-VaultServer-WinAuth.ps1" target="_blank"&gt;https://github.com/miwaniza/Autodesk_Vault_Programmers_Cookbook/blob/master/2.%20Login/1.3.%20Windows%20Authentication/Login-VaultServer-WinAuth.ps1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But it would seem to suggest that I don't need to pass my username and password to UserPasswordCredentials when authenticating using Active Directory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using simple username/password authentication as per this (&lt;A href="https://forums.autodesk.com/t5/vault-customization/here-is-a-working-windows-login-to-vault-but-how-do-i-ensure-a/td-p/3303343" target="_blank"&gt;https://forums.autodesk.com/t5/vault-customization/here-is-a-working-windows-login-to-vault-but-how-do-i-ensure-a/td-p/3303343&lt;/A&gt;) does not work either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;</description>
    <pubDate>Wed, 19 Aug 2020 18:47:07 GMT</pubDate>
    <dc:creator>donalmcnamee</dc:creator>
    <dc:date>2020-08-19T18:47:07Z</dc:date>
    <item>
      <title>PowerShell - Authenticating using Windows credentials</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/powershell-authenticating-using-windows-credentials/m-p/9700529#M3753</link>
      <description>&lt;P&gt;Has anyone any experience of connecting to Vault via PowerShell, but using Windows credentials?&lt;/P&gt;&lt;P&gt;For example, the following code throws an error "New-Object : Exception calling ".ctor" with "1" argument(s): "311""&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
[System.Reflection.Assembly]::LoadFrom('C:\Program Files (x86)\Autodesk\Autodesk Vault 2019 SDK\bin\x64\Autodesk.Connectivity.WebServices.dll')
$serverID = New-Object Autodesk.Connectivity.WebServices.ServerIdentities
   $serverID.DataServer = "MYSERVER"
   $serverID.FileServer = "MYSERVER"
  $VaultName = "MYVAULT"

  $cred = New-Object Autodesk.Connectivity.WebServicesTools.UserPasswordCredentials ($serverID, $VaultName, $true)
  $vault = New-Object Autodesk.Connectivity.WebServicesTools.WebServiceManager($cred)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only thing I found online was this &lt;A href="https://github.com/miwaniza/Autodesk_Vault_Programmers_Cookbook/blob/master/2.%20Login/1.3.%20Windows%20Authentication/Login-VaultServer-WinAuth.ps1" target="_blank"&gt;https://github.com/miwaniza/Autodesk_Vault_Programmers_Cookbook/blob/master/2.%20Login/1.3.%20Windows%20Authentication/Login-VaultServer-WinAuth.ps1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But it would seem to suggest that I don't need to pass my username and password to UserPasswordCredentials when authenticating using Active Directory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using simple username/password authentication as per this (&lt;A href="https://forums.autodesk.com/t5/vault-customization/here-is-a-working-windows-login-to-vault-but-how-do-i-ensure-a/td-p/3303343" target="_blank"&gt;https://forums.autodesk.com/t5/vault-customization/here-is-a-working-windows-login-to-vault-but-how-do-i-ensure-a/td-p/3303343&lt;/A&gt;) does not work either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2020 18:47:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/powershell-authenticating-using-windows-credentials/m-p/9700529#M3753</guid>
      <dc:creator>donalmcnamee</dc:creator>
      <dc:date>2020-08-19T18:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShell - Authenticating using Windows credentials</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/powershell-authenticating-using-windows-credentials/m-p/9700755#M3754</link>
      <description>&lt;P&gt;See if the Autodesk University class helps.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.autodesk.com/autodesk-university/class/Feel-Power-Between-Vault-and-PowerShell-2019" target="_blank"&gt;https://www.autodesk.com/autodesk-university/class/Feel-Power-Between-Vault-and-PowerShell-2019&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2020 20:21:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/powershell-authenticating-using-windows-credentials/m-p/9700755#M3754</guid>
      <dc:creator>ihayesjr</dc:creator>
      <dc:date>2020-08-19T20:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShell - Authenticating using Windows credentials</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/powershell-authenticating-using-windows-credentials/m-p/9709955#M3755</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/205294"&gt;@ihayesjr&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I seen that article alright, but it didn't help much. From what I can make out, the method used to connect to the Vault in the article uses told &lt;STRONG&gt;Connectivity.WebServicesTools&lt;/STRONG&gt; mechanism and I don't see how to pass Windows credentials using that mechanism.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I changed my tact a little and I'm now writing my program in C# as opposed to PowerShell. I can connect to the Vault in C# using the new Vault Concurrency ConnectionManager.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;            VDF.Vault.Results.LogInResult results = VDF.Vault.Library.ConnectionManager.LogIn("myserver", "myvault", null, null, AuthenticationFlags.WindowsAuthentication, null);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sure there's a way to achieve the same in PowerShell, but I just can't see it at the moment.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 07:45:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/powershell-authenticating-using-windows-credentials/m-p/9709955#M3755</guid>
      <dc:creator>donalmcnamee</dc:creator>
      <dc:date>2020-08-25T07:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShell - Authenticating using Windows credentials</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/powershell-authenticating-using-windows-credentials/m-p/11654012#M3756</link>
      <description>&lt;P&gt;Same issue here, cannot manage to login to vault with Windows Account and Powershell using&amp;nbsp;Connectivity.WebServicesTools. Does anyone know how to do so?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 12:34:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/powershell-authenticating-using-windows-credentials/m-p/11654012#M3756</guid>
      <dc:creator>menno.jorna</dc:creator>
      <dc:date>2023-01-03T12:34:37Z</dc:date>
    </item>
  </channel>
</rss>

