I am currently working on implementing the Broker authentication for our Android App. In order to support Conditional Access with Intune, having a broker authentication is a requirement.
I am following the Microsoft Intune App SDK for Android developer guide.
My question is about retrieving the special redirectUri
for the broker usage.
According to the documentation in order to retrieve the redirectUri
for our broker I can use one of the following options:
One of the scripts:
brokerRedirectPrint.ps1
on Windows orbrokerRedirectPrint.sh
on Linux (supplied as part of the samples git project)Use the following API method:
AuthenticationContext.getRedirectUriForBroker(). After retrieving this
RedirectUri` I should list it in one of ours Approved Reply Uri’s in our Azure Application.
Since using the script from #1 requires having the Android_Key_Store
, the password and other variables which I don’t have (as we are not the ones signing the application) I am using method #2.
I was wondering how it the getRedirectUriForBroker
works? Is it receiving this redirect Uri based on the APK signature on run time?
I have called this API from a local debug build and also from an official signed APK build and received two different redirectUris
. Is this expected and I should register both of them in the Azure approved Reply Uris?