This is a migrated thread and some comments may be shown as answers.

Azure Active Directory in AppBuilder app on device

2 Answers 81 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David
Top achievements
Rank 1
David asked on 18 Sep 2014, 03:21 AM
Sorry if this is a newbie question, or asked else where.  I did do some extensive searching, and found something close, but nothing specific to the issue I'm facing.

I'm working with AAD and the Azure client library for javascript.   While my code is working fine in the simulator on the desktop(window pops up, user enters credentials, return token to app),  on the AppBuilder app on the device(ios to be specific) it gets to the point where it should launch the login window, and nothing happens.  Any help would be greatly appreciated.

2 Answers, 1 is accepted

Sort by
0
Anton Dobrev
Telerik team
answered on 19 Sep 2014, 01:47 PM
Hello David,

Could your please specify if the issue is iOS-specific or is reproducible in Android? Also, please specify which JS library are you using in your app - the issue Might be deriving from it. We need to narrow down the issue to the code that is not executable or returns an error on the device.

Some basic troubleshooting tips include the following:
  • If you are using the InAppBrowser plugin for Cordova to show the login dialog- attach an event handler using the addEventListener method to each of the events and examine the results.You can also specify as a second parameter of the InAppBrowser instance the '_system' target which will open the link in Safari.
  • Verify that there is no data stored locally that is used in the app and is not available to the device.
  • Examine any output from the device shown in the output console of your AppBuilder client of choice.
  • Verify that you are not running the app in the AppBuilder Companion app.

If the above approaches do not solve the issue - please, provide a runnable sample so that we are able to investigate the issue locally.

Best regards,
Anton Dobrev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
David
Top achievements
Rank 1
answered on 19 Sep 2014, 06:07 PM
Well it turned out to actually be a newb question.  After going through the MicrosoftServiceClient code(thank you Microsoft for providing a non-minified version), I discovered that calling login on the client before the deviceready event fired was the root of the issue.  The service client can't determine that it is using Cordova/Phonegap until that occurs, and doesn't try to access the InAppBrowser plug-in. There's actually a comment in the code about it.  Once I delayed calling it until that occurred, everything worked as expected.
Tags
General Discussions
Asked by
David
Top achievements
Rank 1
Answers by
Anton Dobrev
Telerik team
David
Top achievements
Rank 1
Share this question
or