locked
The Logic App SalesForce Connector won't authenticate (PREVIEW) RRS feed

  • Question

  • The SalesForce connector in my Logic App stopped working today. Here is the error message.

    ***BEGIN ERROR MESSAGE***

    Error Fetching API Definition 

    Code: 502, Message: Failed to get metadata for ...

    Access token is invalid or expired. You may need to authorize your connector again.

    ***END ERROR MESSAGE***

    Here is some good information from the SalesForce side.

    https://www.salesforce.com/us/developer/docs/api_rest/Content/intro_understanding_refresh_token_oauth.htm

    I can see that there is a refresh_token scope in the API App SalesForce Connector under Authorization. I assume that it should be refreshing the token, but perhaps this is not working.

    I am now trying to manual refresh the token, but I'm running into all kinds of problems. I'm trying to make a POST request to refresh the token.

    Any help anyone can provide is much appreciated.

    Thanks,

    Brian


    Friday, May 15, 2015 10:13 PM

Answers

  • Hi Brian,

    Can you please confirm that you created your account at https://developer.salesforce.com/? Also there was an intermittent issue because of which API APP's package settings are not getting stored correctly. We have made a fix in the SaleForce connector to work with default values if package settings are not provided. Can you please try the latest Salesforce connector (by creating a new Salesforce Connector API APP) and see if that fixes your problem? Thanks for bearing with us on this issue.

    • Marked as answer by Dumber_Texan2 Tuesday, June 23, 2015 5:24 PM
    Tuesday, June 23, 2015 1:05 AM

All replies

  • Hi Brian, You can reauthorize your Salesforce connector in the Logic App by Opening the logic app, select "..." on top of your Salesforce card, Select "Edit this action", and then "Authorize this action". You should see the "Authorize" button on top of your card. Click on Authorize to reauthorize the logic app and it should start working again.

    Hope this helps!

    Thanks!

    [BTW, if "Authorize" button does not show up after you click "Authorize this action", please repeat it one more time and you should be able to see it]  

    Wednesday, May 27, 2015 8:22 PM
  • Hello Sriv,

    That did not work. I can't Authorize the card. In fact, neither Edit or Delete display as highlighted options that I can select. When I click Authorize, I get the same error. I can't Edit or Delete the card. I'm thinking that I will have to Delete the entire Logic App and start over.

    I noticed that the error started when I set the interval to once per year. I had it running once every hour and it was working just fine.

    Perhaps there's a bug. Should I delete the Logic App and start over?

    Brian 

    Monday, June 8, 2015 4:26 PM
  • Hello Sriv,

    Please see my previous response and respond accordingly.

    Thanks,

    Brian

    Thursday, June 18, 2015 8:21 PM
  • [Sorry for the late response, Brian]

    It looks like an UX bug that is not allowing you to Authorize again. If it is okay for you to delete that card alone and add it back, then it should work. Recreating the entire logic app would also work.

    Please let us know if you are still facing issues.  

    Friday, June 19, 2015 3:58 PM
  • Brian,

    I think it would be better if you check if your Salesforce connector is working properly in a new logic app before you delete it.  You can do that by creating one more logic app.

    One thing is not clear in your previous email.  Can you click on ... > Reauthorize.  That will bring up the Authorize button again.  When you click on it, does a popup to launch a new browser page and asked you to login to Salesforce?

    Thanks
    Friday, June 19, 2015 3:58 PM
  • Hi Jeff,

    Thanks for your help.

    No, when I click on Reauthorize, it does not display the SalesForce Authorize dialogue box. It just gives an error. In fact, the only highlighted options are Reauthorize and Documentation. In fact, I can't even Delete the SalesForce Connector from the Logic App. As is, it looks like I'm going to have to delete everything and start all over.

    Brian

     
    Friday, June 19, 2015 4:23 PM
  • Hi Sriv,

    I can't delete the card. In fact, I deleted the SalesForce Connector all together and the card still displays in the Logic App. Since I can't delete the card, I will have to delete the Logic App as well.

    By the way, this was all working just fine until I changed the frequency from once per hour to once per year. I have since changed it to once per day, but the SalesForce authorization is failing.

    I guess I will have to delete the Logic App and rebuild everything, so I can continue building my app.

    Brian

    Friday, June 19, 2015 4:28 PM
  • Sriv and Jeff,

    I deleted everything and tried to recreate it all. I am getting an error when trying to authenticate the SalesForce card.

    Error Fetching API Definition.

    Code: 504, Message: The gateway

    did not receive a response from "Microsoft.App.Service"

    within the specified time period.

    Portal.azure.com is behaving weird today, so I'm not sure if that has anything to do with it. I'm going to create another Connected App in SalesForce to see if that works.

    Brian

    Friday, June 19, 2015 6:21 PM
  • Sriv and Jeff,

    I created a new Connected App in SalesForce with a new ID and Secret. I entered that information into the new SalesForce Connector. I still can't get the card to authorize. I also noticed that the authorization dialogue box that asks for my user name and password only pops up once. The dialogue box only pops up once even though I delete the card and add it back.

    Seems what ever the problem is that it started around mid May. I wonder if SalesForce changed their API. Did Microsoft change anything?

    Brian

    Friday, June 19, 2015 7:53 PM
  • Hi Brian,

    Can you please confirm that you created your account at https://developer.salesforce.com/? Also there was an intermittent issue because of which API APP's package settings are not getting stored correctly. We have made a fix in the SaleForce connector to work with default values if package settings are not provided. Can you please try the latest Salesforce connector (by creating a new Salesforce Connector API APP) and see if that fixes your problem? Thanks for bearing with us on this issue.

    • Marked as answer by Dumber_Texan2 Tuesday, June 23, 2015 5:24 PM
    Tuesday, June 23, 2015 1:05 AM
  • That worked! I deleted everything and started over.

    By the way, here are the procedures that I followed. I wrote a blog post on the integration.

    http://www.faceoffers.com/faceoffers-integration-with-salesforce-using-microsoft-azure-logic-apps-and-api-apps/

    Thanks for your help on this.

    Brian

    Tuesday, June 23, 2015 5:15 PM