I am currently working on an iOS-App that connects to Office365, with the target of iOS7. The following pods are used:
pod 'ADALiOS', '~> 1.2.1'
pod 'Office365/Outlook', '= 0.9.1'
pod 'Office365/Discovery', '= 0.9.1'
When I run it in the simulator all works fine. When I run it on the device, I get a 'Cannot add a new item in the keychain' error.
I also tried the Shared keychain capability, but that didn't change anything.
This is the error message, it even occurs when I run the O365-iOS-Connect-Swift sample from Github:
2015-06-16 20:44:58.758 O365-iOS-Connect-Swift[574:128561] -[ADAuthenticationBroker webAuthenticationDidCompleteWithURL:][379][main] 2015-06-16 20:44:59.586 O365-iOS-Connect-Swift[574:128676] ADALiOS [2015-06-16 18:44:59 - EEAB650A-32FE-4589-925D-EB9797B89E08] ERROR: Error raised: 11. Additional Information: Domain: ADAuthenticationErrorDomain ProtocolCode:(null) Details:Cannot add a new item in the keychain. Error code: -25243.
Could someone from the ADALiOS team help me please? Any hint is highly appreciated!
You need to enable keychain sharing and add com.microsoft.adalcache to your app entitlements.