+ Start a Discussion
bharath kumar 52bharath kumar 52 

How to auto approve application when using Web-Server / Useragent flow in salesforce

Hi All,

I am experimenting on salesforce integrations and i am trying to get data from salesforce to an external system.During that i get a prompt like the one below which prompts me to allow or deny.approval during login
My question is that how do i bypass this screen? i.e provide an auto approval either through config or code whenever an external system needs to access a resource from salesforce once it is authenticated.
This is something which happens when i use Web-Server and Useragent flow. Please advise on which is the best flow when it comes to bidirectional integrations(SFDC --> ERP and ERP ---> to SFDC)

Thanks,
Bharath
ANUTEJANUTEJ (Salesforce Developers) 
Hi Bharath,

I believe this is something that happens because the system whats you to be informed of the permissions it would be taking and I think this is something that happens for every flow and I believe this allow screen appears only once I guess this is something that is designed that way and I don't think it is possible to give auto-approval for this.

In case if you found this information useful can you please choose this as the best answer.

Regards,
Anutej
bharath kumar 52bharath kumar 52

Hi Anutej,

In that case when you trigger an integration between 2 systems and the approval is not given then the integration must fail right but in my case it isn't failing. Here's what i've done :
A dml in one salesforce org must trigger a dml in another (in short replicating data from one org to another to mimic an external integration)
i have configured the username,password,clientid and client secret of the destination org in my source org so that when i fire a dml it then sends the record there and it is actually working. Any thoughts on that?

Thanks,
Bharath