AnsweredAssumed Answered

MAS SDK - Problem with client credentials on ios

Question asked by eduardooliveira on Dec 20, 2018
Latest reply on Dec 30, 2018 by Mark_HE

We are trying to implement an app on ios that uses client credentials flow. We are using the same client and msso.config on ios and android, it works on android but we are getting the following error o ios:

 

Error:

Error Domain=com.ca.MASFoundation.targetAPI:ErrorDomain Code=120007 "Attempted to register the device with a Scope that isn't registered in the application record on the Gateway" UserInfo={NSLocalizedDescription=Attempted to register the device with a Scope that isn't registered in the application record on the Gateway, status-code=0}

}

 

Source code:

MAS.setGrantFlow(.clientCredentials)
MAS.getFrom("/healthprobe/", withParameters: nil, andHeaders: nil, request: .json, responseType: .json, isPublic: false) { (data, error) in

 

 

 

StackTrace:

- 0 : "0 ??? 0x000000012baf5999 0x0 + 5027879321"
- 1 : "1 BBM 0x0000000107a49c20 main + 0"
- 2 : "2 BBM 0x0000000107a09e31 $SSDySSypGSgs5Error_pSgIeggg_So12NSDictionaryCSgSo7NSErrorCSgIeyByy_TR + 289"
- 3 : "3 MASFoundation 0x00000001082c4dcb __49+[MAS parseToEjectURLResponseForCompletionBlock:]_block_invoke + 299"
- 4 : "4 MASFoundation 0x00000001082c501b __45+[MAS parseTargetAPIErrorForCompletionBlock:]_block_invoke + 219"
- 5 : "5 MASFoundation 0x00000001083315d6 __147-[MASNetworkingService sessionDataTaskCompletionBlockWithEndPoint:parameters:headers:httpMethod:requestType:responseType:isPublic:completionBlock:]_block_invoke + 8470"
- 6 : "6 MASFoundation 0x00000001083b157f __67-[MASURLSessionManager dataOperationWithRequest:completionHandler:]_block_invoke + 255"
- 7 : "7 MASFoundation 0x000000010837efa7 __36-[MASSessionDataTaskOperation start]_block_invoke + 135"
- 8 : "8 libdispatch.dylib 0x000000010beb5595 _dispatch_call_block_and_release + 12"
- 9 : "9 libdispatch.dylib 0x000000010beb6602 _dispatch_client_callout + 8"
- 10 : "10 libdispatch.dylib 0x000000010bec365b _dispatch_main_queue_callback_4CF + 710"
- 11 : "11 CoreFoundation 0x00000001098513e9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9"
- 12 : "12 CoreFoundation 0x000000010984ba76 __CFRunLoopRun + 2342"
- 13 : "13 CoreFoundation 0x000000010984ae11 CFRunLoopRunSpecific + 625"
- 14 : "14 GraphicsServices 0x000000010f7021dd GSEventRunModal + 62"
- 15 : "15 UIKitCore 0x000000011320c81d UIApplicationMain + 140"
- 16 : "16 BBM 0x0000000107a49c64 main + 68"
- 17 : "17 libdyld.dylib 0x000000010bf2c575 start + 1"
- 18 : "18 ??? 0x0000000000000001 0x0 + 1"

 

msso.config:

Oauth/manager configuration:

 

Any ideas?

Outcomes