function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sri.nathsri.nath 

Integration to Salesforce without using connected app

Hi there,

I have a scenario where the .NET web application needs to create records and fetch records into/from Salesforce. What I ideally need is:
1. User logs in to .NET application
2. User is taken to Salesforce login page.
3. User enters uname and pwd.
4. Salesforce prompts to approve or deny login.
5. User gets authenticated and the further .NET application will leverage REST API to create Account in Salesforce.

How do I achieve this, without going and creating a connected app in Salesforce instance? This .NET application is used by many customers and each has their own Salesforce instances. I can't go and create a connected app in every instance. Any help appreciated.

Meanwhile, I went through a similar question on stackexchange, but couldn't relate the solution to my use case
https://salesforce.stackexchange.com/questions/56342/rest-api-without-connected-app

Thanks,
Sri

 
Sachin HoodaSachin Hooda
Hi, Sri.nath
So things are pretty clear. As you already mentioned each user has its SF instance and you can't go and say give your credentials. I've to install ConnectedApp :/. So it seems people are taking a different means of a ConnectedApp.
So What a ConnectedApp does, it simply authorizes the client, whether the client should be allowed to access the data.
So, you don't need to install it in every other org of the users.
You simply can create a ConnectedApp at your SF Instance from where you wanted the user to access the data. 
Once you're done creating it, for the user to authorize himself he'd need the client id, a secret token, username & password of the target SF. Well, that is the same as giving a loaded gun to the client.
Read more about the user-password flow here. (https://help.salesforce.com/articleView?id=remoteaccess_oauth_username_password_flow.htm&type=5)
So if the connection became successful, a Session id or Access token would be returned that can be used to access the data.
Well well, it's an optional approach instead you can go with the User-agent flow (https://help.salesforce.com/articleView?id=remoteaccess_oauth_user_agent_flow.htm&type=5) and you certainly give the user the gun but bullets of comparable less power.

Thanks,
Sachin (: