<?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 Connect to WFA vi web services using machine domain account? in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Connect-to-WFA-vi-web-services-using-machine-domain-account/m-p/73650#M15363</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All, I am creating a script that will invoke a WF via web services (so it can be scheduled).&amp;nbsp; However, the user does not want to store the credentials within the script file. What are my options? Should I import the wfa module and get wfa credentials, or is there a better way?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jun 2025 05:38:57 GMT</pubDate>
    <dc:creator>stephen2</dc:creator>
    <dc:date>2025-06-05T05:38:57Z</dc:date>
    <item>
      <title>Connect to WFA vi web services using machine domain account?</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Connect-to-WFA-vi-web-services-using-machine-domain-account/m-p/73650#M15363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All, I am creating a script that will invoke a WF via web services (so it can be scheduled).&amp;nbsp; However, the user does not want to store the credentials within the script file. What are my options? Should I import the wfa module and get wfa credentials, or is there a better way?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 05:38:57 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Connect-to-WFA-vi-web-services-using-machine-domain-account/m-p/73650#M15363</guid>
      <dc:creator>stephen2</dc:creator>
      <dc:date>2025-06-05T05:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to WFA vi web services using machine domain account?</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Connect-to-WFA-vi-web-services-using-machine-domain-account/m-p/73654#M15365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stephen2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; You&lt;SPAN style="color: #ff0000;"&gt; can't&lt;/SPAN&gt; import the WFA module outside of WFA commands and call the Get-WfaCredentials to get credentials. This won't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest you use the REST api ApiExecutionResource to get the credentials. The following code works fine ( crudely written, but commented every step )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=====&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;#wfa Credentials. Modify it as your settings. My WFA HTTP port is 90.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$user = "admin"&lt;/P&gt;&lt;P&gt;$pass = "admin"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;#Create Credential object for WFA login&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$secpasswd = ConvertTo-SecureString $pass -AsPlainText -Force&lt;/P&gt;&lt;P&gt;$cred = New-Object System.Management.Automation.PSCredential ($user, $secpasswd)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;#API to get the genericSession element. This ONLY works with localhost&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;$add = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://localhost:90/rest/execution/api/create" target="_blank"&gt;http://localhost:90/rest/execution/api/create&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;#Invoke REST API&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;$wf=Invoke-RestMethod -Uri $add -Method Post -Credential $cred -ContentType "application/xml" -Headers @{"Authorization"="Basic YWRtaW46YWRtaW4="}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;#Obtain the UUID from generi session element.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;$uuid= $wf.genericSession.uuid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;#The Cluster/Array or any host whose Credentials you require. You need to have the credentials already saved in WFA&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;$host_name = "1.2.3.4"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;#API to get the Username/Password in plain text&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;$add2 = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://localhost:90/rest/execution/api/$uuid/credentials?hostId=$host_name" target="_blank"&gt;http://localhost:90/rest/execution/api/$uuid/credentials?hostId=$host_name&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;#Invoke REST API&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;$wf2=Invoke-RestMethod -Uri $add2 -Method Get -Credential $cred -ContentType "application/xml" -Headers @{"Authorization"="Basic YWRtaW46YWRtaW4="}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;# Get Username/Password form the returned XML object&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;$userName = $wf2.userCredentials.userName&lt;/P&gt;&lt;P&gt;$PlainPassword = $wf2.userCredentials.password&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;#Create Secure String for the Password&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;$secPassword = ConvertTo-SecureString $PlainPassword -AsPlainText -Force&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;#Build credential object&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;$Creds = New-Object System.Management.Automation.PSCredential ($userName, $secPassword)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;#This Credentail $Creds can be used in the remaining code. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=====&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 07:52:04 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Connect-to-WFA-vi-web-services-using-machine-domain-account/m-p/73654#M15365</guid>
      <dc:creator>sinhaa</dc:creator>
      <dc:date>2014-04-03T07:52:04Z</dc:date>
    </item>
  </channel>
</rss>

