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
akshay21akshay21 

requested scope not allowed error

hello,

 

m developing an android app using a template app from Salesforce mobile SDK.

i hv replaced client id with the consumer key of my connected app and callback url with my own :- myapp:///mobilesdk/detect/oauth/done

in the rest.xml of template app.

 theu when i run it, m asked enter my credenials and authorization process continues till after entering a verification code but after that i get a flash msg "1804:requested Scope is not allowed" i wonder why this error is coming..?

 


i haven't written any apex code of any sort for app on sf if that is to be done pls tlet me know...

 

regards and many thanks in advance,

akshay.

Best Answer chosen by Admin (Salesforce Developers) 
Kevin HawkinsKevin Hawkins
It sounds like you don't have sufficient scopes defined in your Connected App. If you're developing a native app, you need at least the following scopes defined:

Perform requests on your behalf at any time
Access and manage your data

If you're developing a hybrid/web app, you also need the following additional scope:

Provide access to your data via the Web

Hope this helps,
Kevin

All Answers

Kevin HawkinsKevin Hawkins
It sounds like you don't have sufficient scopes defined in your Connected App. If you're developing a native app, you need at least the following scopes defined:

Perform requests on your behalf at any time
Access and manage your data

If you're developing a hybrid/web app, you also need the following additional scope:

Provide access to your data via the Web

Hope this helps,
Kevin
This was selected as the best answer
akshay21akshay21

hello kevin!

 

Thanx a lot... it worked...:) but i wonder why it dint work even when i had given full access...?

 

regards..!!

Kevin HawkinsKevin Hawkins

"Full access" is a little bit of a misnomer, as it does not include the "Allow on my behalf" setting, which is required for Mobile SDK apps.

 

Glad it worked for you!

 

Cheers,

Kevin

 

akshay21akshay21

hello kevin,

 

Thanx for shading light on scope for me.. now it is clearer to me.. !

 

regards,

akshay

Vivek SoniVivek Soni
Hello Kevin/Akshay,

I am also facing same issue and as suggested by kavin, i have provided scope permission but still getting "requested scope not available". At ios native app side, i have provided below permission as well.
 [SalesforceSDKManager sharedManager].authScopes = @[@"api",@"refresh_token",@"offline_access"];

Please suggest any link for this ?

Thanks
Vivek
 
Vivek SoniVivek Soni
Its resolved now, It was due to call back url. I was using https://, now changed to "myapp:///mobilesdk/detect/oauth/done" format.