Here are my app's organization settings, with the actual organization / product slugs redacted to xxx / yyy.
<!-- enable organization mode -->
<bool name="organization">true</bool>
<!-- organization display name -->
<string name="organization_name">XXXXXXXXXXXXXXX</string>
<!-- organizational name for API endpoint URL - must specify for orgMode *new* -->
<string name="organization_slug">xxx</string>
<!-- enable product string for API endpoint URL - must specify for orgMode *new* -->
<string name="product_slug">yyy</string>
Are you trying to create an customer for a product? Can you post a bit more about the platform or method on the way you are trying to login or create them?
I’ve also had a lot of luck using the primary account tokens as well as logging in or operating the cloud api using customers and their oauth generated tokens.
Thanks @1inarow - I’m using the iOS and Android SDKs. I’ve set the SDKs’ customization settings according to the documentation (see the code snippet above).
This should be possible according to the documentation. But I’ve found several cases where the documentation is incorrect. So the question is, do the SDKs actually support authentication via organizations, or am I just doing something wrong?
@lynn do you have any HTTP logs you could share (privately) comparing the request made on iOS vs Android? (On Android, you can enable full HTTP logging by adding this string resource to your app: <string name="http_log_level">FULL</string> )
(note: this logs literally everything, so obviously you don’t want this on by default! =)
Otherwise, I can try a manual test of this on my own tonight and we can continue from there.
@lynn Yeah, there can def. be sensitive data in the logs, so the best way to share them privately would be to zip them up, toss them onto Google Drive (or dropbox, whatever) and give access to my account to read the file: jens.knutson@gmail.com
Nice to see you’ve got a handle on the issue already – thanks for looking into this with me. To clarify, the actual URL being requested is identical between the two apps, but on Android a 404 is returned, correct?
@ido / @idok can you comment on these? (I can check the accounts code on my own later today, but I think you’re in a better place to answer the logging question.)
Hi @ido - the problem is that I’m getting a 200 response, but I’m worried that it’s hitting the wrong URL.
What is the best way to monitor network traffic in XCode? I’ve been banging my head on this for the past few days. I’ve even tried WireShark, but I think the traffic is encrypted so I can’t see any of the request info.
Sorry, I need a some clarification on the issue - what are you trying to achieve? thru what API? what’s failing? how did you figure out that’s failing?
When I try to login or sign up using the Android Setup SDK, I get the following error:
"Organization not found for user's role"
When I log the request using http_log_level = true, I see that my organization endpoint is returning a 404. I sent the full request log to @jensck. I can send it to you as well if you give me your email address.
The strange thing is that I am able to register accounts and log in via the iOS setup SDK. And stranger still is that I can login from Android using accounts that were created via the iOS setup SDK.
I suspect that the iOS SDK is not actually using our organization endpoint for the following reasons:
The successful login request on Android does not contain any information about the organization.
So @ido or @jensck - can you please check that our organization exists in your database at the slug that I’ve set and is configured correctly for customer authentication via the SDKs?