i am a .net developer and new to salesforce.
I have currently build a .net web application which queries account details from multiple salesforce orgs. I am using partner wsdl to dynamically pull the orgs metadata. The user(usually system administrator user in SF) who provides the credentials also selects which org he/she belongs to from a drop down.
I would like to know if there is any way i can determine which org the user belongs to and pull the orgs metadata/object's API name dynamically using the user's credentials? Similar to how workbench works.I do not want to generate and consume any wsdl from salesforce. I noticed that workbench is by default a connected app in every salesforce org. If i make my application a connected app in all the orgs i am querying from, will that let me determine which org the user belongs to? if so how? Maybe i am not understanding the concept to connected apps correctly.