<?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>question Re: NiFi : InvokeHttp, authenticate  to Salesforce's Bulk API V 2 , Oauth 2 in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NiFi-InvokeHttp-authenticate-to-Salesforce-s-Bulk-API-V-2/m-p/306670#M222953</link>
    <description>&lt;P&gt;You can leverage "Attributes to send"&amp;nbsp; or if you stop processor and click + you can add custom attributes right on bottom of processor config.&amp;nbsp; &amp;nbsp;If you are not getting anything out of response (failure, retry, no-retry, etc) then you definitely have a connectivity issue from Nifi outbound...&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Dec 2020 15:49:16 GMT</pubDate>
    <dc:creator>stevenmatison</dc:creator>
    <dc:date>2020-12-01T15:49:16Z</dc:date>
    <item>
      <title>NiFi : InvokeHttp, authenticate  to Salesforce's Bulk API V 2 , Oauth 2</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-InvokeHttp-authenticate-to-Salesforce-s-Bulk-API-V-2/m-p/306636#M222935</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;I am trying to authenticate with&amp;nbsp; &lt;STRONG&gt;InvokeHttp&lt;/STRONG&gt; NiFi Processor to Salesforce by using &lt;STRONG&gt;Bulk API v2&lt;/STRONG&gt; and with &lt;STRONG&gt;OAuth 2.0 &lt;/STRONG&gt;:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ck_sadchaouche_6-1606816870985.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/29627i0031513CC3879441/image-size/medium?v=v2&amp;amp;px=400" role="button" title="6-1606816870985.png" alt="6-1606816870985.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The InvokeHttp Processor is configured as follow :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ck_sadchaouche_7-1606817038511.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/29628i0A199AA4C0378214/image-size/medium?v=v2&amp;amp;px=400" role="button" title="7-1606817038511.png" alt="7-1606817038511.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The Remote URL is made by using this syntax:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://&amp;lt;my" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;https://&amp;lt; my&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;domain &amp;gt;.salesforce.com/services/oauth2/token?grant_type=password&amp;amp;client_id=&amp;lt;client_id&amp;gt;&amp;amp;client_secret=&amp;lt;client_secret&amp;gt;&amp;amp;username=&amp;lt;username&amp;gt;&amp;amp;password=&amp;lt;password + key&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;As we are using the HTTPS protocol, we add a “SSL Context Service” by setting a new “SSL Context Controller Service”:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ck_sadchaouche_8-1606817459585.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/29629iAD1CC8771C8BBD9A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8-1606817459585.png" alt="8-1606817459585.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And the Post request is already tested and worked with Postman tool, by responding with an authentication token.&lt;/P&gt;
&lt;P&gt;The blocking point for this use case is that, with InvokeHTTP NIFI Processor we have not been able to get a response from the Bulk API ( the first image show that we never receive any response from Salesforce )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have any suggestion, it's will be helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance&lt;/P&gt;
&lt;P&gt;KSAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 10:25:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-InvokeHttp-authenticate-to-Salesforce-s-Bulk-API-V-2/m-p/306636#M222935</guid>
      <dc:creator>Ksad</dc:creator>
      <dc:date>2020-12-01T10:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi : InvokeHttp, authenticate  to Salesforce's Bulk API V 2 , Oauth 2</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-InvokeHttp-authenticate-to-Salesforce-s-Bulk-API-V-2/m-p/306654#M222945</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/56378"&gt;@Ksad&lt;/a&gt;&amp;nbsp; Excellent work to completely show us what you have.&amp;nbsp; Also, excellent work to test and confirm your request work in postman first.&amp;nbsp; This is always one of the first things I do to make sure i have a valid test connection and all settings to connect to the API before attempting with InvokeHttp.&amp;nbsp; &amp;nbsp; When you take this route, and you cannot get a response, this indicates a networking issue with Nifi to [salesforce domain].&amp;nbsp; You should test command line from NiFi node to [salesforce domain] using curl, wget, telnet, etc.&amp;nbsp; &amp;nbsp; Next if you can confirm connectivity, attempt to adjust the processor time outs.&amp;nbsp; &amp;nbsp;Some systems need longer than defaults.&amp;nbsp; For example I sometimes set to 50 and 150 by just adding a 0 to the 2 values (connection and read timeout).&amp;nbsp;&amp;nbsp;f it did time out it should throw an error.&amp;nbsp; You can also set the processor log level to debug to expose more verbose output in the NiFi UI.&amp;nbsp; Last but not least,&amp;nbsp; tail the nifi-app.log file while doing all nifi flow debugging.&amp;nbsp; Sometimes more useful information is found there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this answer resolves your issue or allows you to move forward, please choose to ACCEPT this solution and close this topic. If you have further dialogue on this topic please comment here or feel free to private message me. If you have new questions related to your Use Case please create separate topic and feel free to tag me in your post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Steven&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 13:09:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-InvokeHttp-authenticate-to-Salesforce-s-Bulk-API-V-2/m-p/306654#M222945</guid>
      <dc:creator>stevenmatison</dc:creator>
      <dc:date>2020-12-01T13:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi : InvokeHttp, authenticate  to Salesforce's Bulk API V 2 , Oauth 2</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-InvokeHttp-authenticate-to-Salesforce-s-Bulk-API-V-2/m-p/306667#M222951</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/60150"&gt;@stevenmatison&lt;/a&gt; for the quick answer.&lt;/P&gt;&lt;P&gt;The connection between my local machine (where NiFi is installed and executed) and salesforce server is working well, because i already tried with postman and it is working.&lt;/P&gt;&lt;P&gt;also, I increased the timeout as shown in the image below :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="invokke http.png" style="width: 640px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/29638i50AAB237E28F569B/image-size/large?v=v2&amp;amp;px=999" role="button" title="invokke http.png" alt="invokke http.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;and also activate the logging to debug level :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="debug logging.JPG" style="width: 302px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/29636i54CAF057EA808F26/image-size/large?v=v2&amp;amp;px=999" role="button" title="debug logging.JPG" alt="debug logging.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But still have no output inthe Bulltin board of NiFi.&lt;/P&gt;&lt;P&gt;I let it run for 2minutes and had this log lines from the app.log file :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="loging.JPG" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/29637iB71306A418EC0132/image-size/large?v=v2&amp;amp;px=999" role="button" title="loging.JPG" alt="loging.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;i an wondering if there a parameter to add for the InvokeHttp processor like "authorization:OAuth2" or other ?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 14:59:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-InvokeHttp-authenticate-to-Salesforce-s-Bulk-API-V-2/m-p/306667#M222951</guid>
      <dc:creator>Ksad</dc:creator>
      <dc:date>2020-12-01T14:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi : InvokeHttp, authenticate  to Salesforce's Bulk API V 2 , Oauth 2</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-InvokeHttp-authenticate-to-Salesforce-s-Bulk-API-V-2/m-p/306670#M222953</link>
      <description>&lt;P&gt;You can leverage "Attributes to send"&amp;nbsp; or if you stop processor and click + you can add custom attributes right on bottom of processor config.&amp;nbsp; &amp;nbsp;If you are not getting anything out of response (failure, retry, no-retry, etc) then you definitely have a connectivity issue from Nifi outbound...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 15:49:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-InvokeHttp-authenticate-to-Salesforce-s-Bulk-API-V-2/m-p/306670#M222953</guid>
      <dc:creator>stevenmatison</dc:creator>
      <dc:date>2020-12-01T15:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi : InvokeHttp, authenticate  to Salesforce's Bulk API V 2 , Oauth 2</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-InvokeHttp-authenticate-to-Salesforce-s-Bulk-API-V-2/m-p/306677#M222955</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/60150"&gt;@stevenmatison&lt;/a&gt; , by using Curl command with my local machine , the authentication on salesforce is working and i get a token:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksad_0-1606840816127.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/29639i049664211B6AC034/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksad_0-1606840816127.png" alt="Ksad_0-1606840816127.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And i already try the SOAP connection to Salesforce and it is working also. But with Oauth2.0 is not &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So the problem is on NiFi InvokeHTTP Processor&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 16:43:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-InvokeHttp-authenticate-to-Salesforce-s-Bulk-API-V-2/m-p/306677#M222955</guid>
      <dc:creator>Ksad</dc:creator>
      <dc:date>2020-12-01T16:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi : InvokeHttp, authenticate  to Salesforce's Bulk API V 2 , Oauth 2</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-InvokeHttp-authenticate-to-Salesforce-s-Bulk-API-V-2/m-p/306704#M222969</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/60150"&gt;@stevenmatison&lt;/a&gt;the solution that i find is to get the Oauth2 token from slaesforec by using command Curl. like is explained in this page : &lt;A href="https://www.jitendrazaa.com/blog/salesforce/using-curl-with-salesforce-rest-api/" target="_blank" rel="noopener"&gt;https://www.jitendrazaa.com/blog/salesforce/using-curl-with-salesforce-rest-api/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So i create a ExecuteProces NiFi Procesor. And as parameter i put :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksad_0-1606897337729.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/29642i904A454D64FE2DB1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksad_0-1606897337729.png" alt="Ksad_0-1606897337729.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;the file C:/loginInfo.txt contains :&lt;/P&gt;&lt;P&gt;grant_type=password&amp;amp;&lt;/P&gt;&lt;P&gt;client_id= 3MVG9iTxZANhwsdsdsdsdspr0LstjR3sRat &amp;amp;&lt;/P&gt;&lt;P&gt;client_secret=21961212323233121943 &amp;amp; username=jitendra.zaa@demo.com &amp;amp;&lt;/P&gt;&lt;P&gt;password=myPWDAndSecurityToken&lt;/P&gt;&lt;P&gt;and the i get a response with the authentication token &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(you can use the cmd command Curl -x post -d @LoginInfo.txt &lt;A href="Https://test.salesforce.com/..." target="_blank" rel="noopener"&gt;Https://test.salesforce.com/...&lt;/A&gt;. to test the connection between the local machine and salesforce )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 08:26:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-InvokeHttp-authenticate-to-Salesforce-s-Bulk-API-V-2/m-p/306704#M222969</guid>
      <dc:creator>Ksad</dc:creator>
      <dc:date>2020-12-02T08:26:24Z</dc:date>
    </item>
  </channel>
</rss>

