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
Austin VillanuevaAustin Villanueva 

how different users access to connected app? I use client id and client secret but no information get from connected app. Please help .I need it ASAP!!

Why I'm not getting the data from the connected app that I'm accessing? I have the right client_id and client secret and I put the "full access to the connected app" and in the users of the auth I can't see why my other account is not listed. Somebody please help me,
Best Answer chosen by Austin Villanueva
NagendraNagendra (Salesforce Developers) 
Hi Austin,

A connected app is much like an "app" on Facebook. The actual app exists elsewhere  but authenticates with Facebook to retrieve database information (e.g. your friends, date of birth, and email).

Simply direct the user to the authentication service (such as https://login.salesforce.com/services/oauth2/authorize) with your connected app details, and the user will be prompted to login. On successful login, they may need to authorize the app ("grant"), at which point, salesforce.com will redirect the user back to the app with an access token the app can use to leverage the API, plus some user information (like the URL to use for API calls).

Depending on if you're using the Web Service flow or User-Agent flow, your process may be slightly different. One gives you a token that you have to "cash in" for a real access token, while the other immediately provides an access token. The Web Service flow uses the client secret as an extra password (more protection), versus the User-Agent flow (for untrusted environments).

The connected app does not need to exist in the other org before the first use, but if it doesn't, an administrator needs to be the first one to use the application so they can grant access to the app. This allows administrators to review what information is accessible to the app and configure who can use the app.

Please mark this post as solved if it helps.

Best Regards,
Nagendra.P

All Answers

NagendraNagendra (Salesforce Developers) 
Hi Austin,

A connected app is much like an "app" on Facebook. The actual app exists elsewhere  but authenticates with Facebook to retrieve database information (e.g. your friends, date of birth, and email).

Simply direct the user to the authentication service (such as https://login.salesforce.com/services/oauth2/authorize) with your connected app details, and the user will be prompted to login. On successful login, they may need to authorize the app ("grant"), at which point, salesforce.com will redirect the user back to the app with an access token the app can use to leverage the API, plus some user information (like the URL to use for API calls).

Depending on if you're using the Web Service flow or User-Agent flow, your process may be slightly different. One gives you a token that you have to "cash in" for a real access token, while the other immediately provides an access token. The Web Service flow uses the client secret as an extra password (more protection), versus the User-Agent flow (for untrusted environments).

The connected app does not need to exist in the other org before the first use, but if it doesn't, an administrator needs to be the first one to use the application so they can grant access to the app. This allows administrators to review what information is accessible to the app and configure who can use the app.

Please mark this post as solved if it helps.

Best Regards,
Nagendra.P
This was selected as the best answer
Austin VillanuevaAustin Villanueva
Hi Nagendra.P, Thank you very much for this very detailed explanation. so correct if I'm wrong. so if I connect to the connected app through api, I will not get the data of the creator's connected app, right? only my data? that's why the data I'm trying to access to other account is not found because it only exists in the original account. Am I correct? right? Thanks again. You give me a good example with the facebook app.