Questions » Recent Q&A » Authenticate Xamarin Forms app using BB Work

Authenticate Xamarin Forms app using BB Work

Posted 31 days ago
  • I think authentication delegation is what you are looking for.  You can read more about it at this link:  http://help.blackberry.com/en/blackberry-uem/12.8/administration/blackberry-dynamics-profile-settings.html

  • Thanks @Mark.

    Would that work with given the only BB app on user's device is Work? Is there any good page with the API references?

    Thanks!

  • Any suggestion how to use Secure Single Sign-On using BlackBerry Dynamics Authentication Token - IBBDUtility?

    Thanks!

     

  • Any BlackBerry Dynamics application can be set up to be the authentication delegate.  This feature is handled automatically by the BlackBerry Dynamics Runtime, no coding is required in your app to support this.  So it isn't something covered in the API guide.

     

    You can find information about authenticating with a BlackBerry Dynamics authentication token here:  https://developer.blackberry.com/devzone/files/blackberry-dynamics/android/_server_a_p_i_g_d_auth_token.html

  • Thank you Mark, I will have a look.

    ATM I'm experimenting with the following...

    ...
                _bbdx = BBDDependencyService.Get<IBBDXamarin>();            
                _bbdx.BBDAppEvent += OnBBDAppEvent;

                if (_bbdx.IsActivated)
                {
                    _bbdutility = BBDDependencyService.Get<IBBDUtility>();
                    _bbdutility.GetBBDAuthToken(Challenge, Server);
                }

    But the app is asking me for access key even though the BB Work is already up and runing on my phone..

    Any suggestions?

    Thanks!

  • One requirement for easy activation is that the native application identifers have been entered into the applicatoin's details on BlackBerry UEM.  To do so select your BlackBerry Dynamics app in BlackBerry UEM (from the apps list) and enter the iOS bundle ID and Android package name on the appropriate tabs.
  • Hello,

    @Mark, I have followed the setup required on the management portal to set up my app (version, package etc)

    When I launch my app, it opens the 'MyApp can be set up using the BB Work' screen, next is the password entry screen. Upon submitting the request it fails with the following: You are not entitle do the application or version.

    My App.cs and/or MainActivity listeners are not receiving any callbacks or events upon authorization failure.

    What am I missing here?

    Thank you!

     

     

  • I have followed this guide with no result:

    https://help.blackberry.com/en/blackberry-dynamics-sdk-xamarin-android/current/xamarin-android-development-guide/nqd1505508599714.html

     

  • That error indicates either the entitlement, or entitlement version are incorrect on your server or that the application has not been assigned to the user you are testing with.  Have a look at the steps on this page, which should fix that error.

    https://developers.blackberry.com/us/en/resources/get-started/blackberry-dynamics-getting-started.html?platform=android#step-4

  • Thanks again @Mark!

    I successfully authorised the app!

    _bbdXamarin = BBDDependencyService.Get<IBBDXamarin>();
    _bbdXamarin.Authorized += OnAuthorized;

    How can I now obtain basic user information from the BB Work? Should I try getting the User Token?

    Thank you

2 pages
Back