+ Start a Discussion
L MudiL Mudi 

Access Sandbox meta data from a different Org

Hi There,

I want to access Metadata of a salesforce org (either developer or sandbox) from another salesforce org. I think I can use oAuth 2.0 to access it. Any thoughts on that? If it is oAuth, can someone guide me a place where I can start with?
BR, Mudi
Best Answer chosen by L Mudi
Amit Singh 1Amit Singh 1
Yeah, you can do the same thing and one thing wanted to clarify that App will never ask for Key/Secret it will only ask for UserName and Password you need to store the Consumer Key and Consumer Secret and then can use to connect any org which can be a brand new one.

Hope this helps, mark as best answer if this helps :)

Thanks,
Amit

All Answers

Amit Singh 1Amit Singh 1
Hi,

You can access Metadata of any Salesforce Org from any Other Org using password authentication OR OAuth 2.0.

Refer below link for more information.
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_username_password_oauth_flow.htm
https://developer.salesforce.com/page/Digging_Deeper_into_OAuth_2.0_on_Force.com

You can start using below link.
https://trailhead.salesforce.com/modules/apex_integration_services
 
Let me know if this helps :)
 
Thanks,
Amit Singh
Rahul_kumar123Rahul_kumar123
Hi LMudi,
To Access metadata from one salesforce dev org to another salesforce dev org please check the below link.
When users request Salesforce data from within the external app (the consumer’s page), Salesforce authenticates the user. The authentication flow consists of several steps, dictated by the OAuth standard.Please check the below link Provided by Salesforce help document.
I hope it will be helpful.

Best Regards
RahulKumar
L MudiL Mudi
Appriciate your help guys. The concern i have here is, everytime I need to have a connected App on the sandbox to access consumer ID and consumer Secrets right? So if the user wants to access a different sandbox or the production, he needs to create Connected Apps and have consumer ID/secret with him. Is there any practical way to address this scenario?
Amit Singh 1Amit Singh 1
No, user do not need to create connected apps again and again for every Sandbox instance. You only need to create once and then store them in your org after that it will only ask for Username and Password of Sandbox instance for which you wanted to access the data.,

Thanks,
Amit
L MudiL Mudi
Appriciate Amit. What you're saying is ask for it once, store it in my org (maybe on a custom setting) and use it again? What if I want to access totally new Org with sandboxes? Still maintain them sameway? 

Br,
Mudi
Amit Singh 1Amit Singh 1
Yeah, you can do the same thing and one thing wanted to clarify that App will never ask for Key/Secret it will only ask for UserName and Password you need to store the Consumer Key and Consumer Secret and then can use to connect any org which can be a brand new one.

Hope this helps, mark as best answer if this helps :)

Thanks,
Amit
This was selected as the best answer
L MudiL Mudi
I will, absolutely this will make total sense. Apologies for taking your time.
To clarify the process am going to do, 1. I will create an Interface for User to Provide Username, Password, key/secret pair for the first time. 2. Store them in my org and everytime the same user tries to access, I can use stored key/secret values and so on. Am I correct?

Many Thanks,
Mudi 
Amit Singh 1Amit Singh 1
Yeah, you are right.
Thanks
Johny SinsJohny Sins
Hi, Very best discussion. Thanks for sharing the helpful information. I am Johny Sins from Plumbers In Ohio (https://www.edocr.com/user/plumbersinohio).
Thop Tv 9Thop Tv 9
Thanks for your information nice discuss lulubox (https://lulubox.me)
dk alivedk alive
I will, absolutely this will make total sense. Apologies for taking your time.
Snapseed for pc (https://snapseedforpcapk.com)
Facetime apk (https://facetimeappdownload.com/)
jahanzaib Ahmadjahanzaib Ahmad
Thank you for this amazing information
FaceTime for Android  (http://smartandroidfun.com/facetime-for-android/)
News Views (https://newsviews.pk/)
Muhammad SajjadMuhammad Sajjad

This is just the kind of information that I had been looking for, Thanks a ton once again, Regards host2speed.com (https://host2speed.com/)