IDENTITY-AND-ACCESS-MANAGEMENT-ARCHITECT practice question 16 of 30

An identity architect has built a native mobile application and plans to integrate it with a Salesforce Identity solution. The following are the…

Full set: 248 questions
An identity architect has built a native mobile application and plans to integrate it with a Salesforce Identity solution. The following are the requirements for the solution: 1. Users should not have to login every time they use the app. 2. The app should be able to make calls to the Salesforce REST API. 3. End users should NOT see the OAuth approval page. How should the identity architect configure the Salesforce connected app to meet the requirements?
Answer options
A: Enable the API Scope and Offline Access Scope, upload a certificate so JWT Bearer Flow can be used and then set the connected app access settings to "Admin Pre-Approved".
B: Enable the API Scope and Offline Access Scope on the connected app, and then set the connected app to access settings to 'Admin Pre-Approved". Correct answer
C: Enable the Full Access Scope and then set the connected app access settings to "Admin Pre- Approved".
D: Enable the API Scope and Offline Access Scope on the connected app, and then set the Connected App access settings to "User may self authorize".
Correct Answer:
B. Enable the API Scope and Offline Access Scope on the connected app, and then set the connected app to access settings to 'Admin Pre-Approved".
Explanation

The solution requires a configuration that allows a native mobile app to access Salesforce APIs on behalf of a user, avoid repeated logins, and bypass the user consent screen.
1. API Access: The api scope grants access to Salesforce REST APIs.
2. No Re-login: The offlineaccess scope is required to obtain a refresh token. The mobile app can use this refresh token to get a new access token silently when the current one expires, meeting the requirement that users do not have to log in every time.
3. No Approval Page: Setting the connected app's access policy to "Admin approved users are pre-authorized" ensures that users with approved profiles or permission sets will not see the consent screen.
Option B correctly combines these three essential configurations.

Why Incorrect

A: This is incorrect because the OAuth 2.0 JWT Bearer Flow is designed for server-to-server integrations, not for native mobile applications where securely storing a private key is problematic. The offlineaccess scope already addresses the requirement to avoid re-logins, making the JWT configuration redundant and inappropriate for this use case. C: This is incorrect as it lacks the offlineaccess scope, which is necessary to obtain a refresh token and prevent users from having to log in repeatedly. D: This is incorrect because the "User may self authorize" setting explicitly presents the OAuth approval page to the user upon first use, which directly contradicts a stated requirement.

References

1. Salesforce Help Documentation, OAuth 2.0 Refresh Token Flow for Renewed Sessions: "To obtain a refresh token, you must request the offlineaccess scope... The OAuth 2.0 refresh token flow can be used to renew access tokens issued by the OAuth 2.0 web server flow or the OAuth 2.0 user-agent flow," which are common flows for mobile applications. (Salesforce Help, OAuth 2.0 Refresh Token Flow)

2. Salesforce Help Documentation, OAuth Scopes: Defines the standard scopes. api (Access user data via APIs) and offlineaccess (Access user data when the user is offline) are explicitly mentioned as the necessary scopes for this scenario. (Salesforce Help, OAuth Scopes)

3. Salesforce Help Documentation, Manage OAuth Access Policies for a Connected App: "To bypass the authorization step and suppress the consent page, you can pre-authorize users. For the Permitted Users OAuth policy, select Admin approved users are pre-authorized." (Salesforce Help, Connected App OAuth Usage)

4. Salesforce Help Documentation, OAuth 2.0 JWT Bearer Flow for Server-to-Server Integration: "The OAuth 2.0 JWT bearer token flow is for server-to-server integration scenarios... This flow uses a certificate to sign the JWT request and doesn’t require explicit user interaction." This confirms its intended use is not for client-side native mobile applications. (Salesforce Help, OAuth 2.0 JWT Bearer Flow)

Scroll to Top