msintuneappsdk/intune-app-sdk-xamarin

How to do the Single Sign On Process in Xamarin.iOS with Broker or Without Broker.

sureshbabu4 opened this issue · 12 comments

Hi Folks,

Could you please help me to get Single Sign on with or without broker in Xamarin.iOS.
I had read from the some active directory link, but I didn't understand that process,if any one know please suggest the briefly explained steps with Intune account has logged in with ADAL Sign in. I think to write the code in app delegate with Intune Enrolment. Please suggest to me with exactly steps.

Thanks in Advance,
Suresh.

@Kyle-Reis, Thanks a lot for Good Suggestion, I am little bit confused to Catches will do in Info.plist or any code. if you don't mind please provide that information for Xamarin.iOS steps with ADAL, SSO with or without Broker.I have followed the link it may be for Web application not for Xamarin.

Thanks in Advance.

Hey @sureshbabu4, those are the steps for enabling SSO between the Intune Xamarin.iOS bindings and ADAL/MASAL for .Net in a Xamarin.iOS app. I'm not sure why you think they are for a web app? Could you explain what exactly you are confused about? That will help to make sure I can answer the specific questions you have.

@Kyle-Reis, Great Answer, Thanks a Lot, Just confirm to me, if I am wrong any of these.
I need to declare the Adal Cache(com.microsoft.adalcache) and Mam Cache(com.microsoft.intune.mam) in enable key sharing in entitlement .plist,
and Adal client id ,Adal authority,Adal redirect Uri add to IntuneMAMSettings as a Dictionary add to Info.List. Then after process I am little bit confused, to write code in .cs files or is there anything to do the enrolment the Intune account for Single Sign On. Could you please help me.

Thanks in Advance,
Suresh.

It sounds like you are on the right track. The next step would be to write some code to actually initiate the enrollment. Before doing this, I just want to verify that your app is already using ADAL or MSAL for .Net to authenticate? If so, which version?

@Kyle-Reis, Thanks, now I am using ADAL 3.19.8 version.
Please help to get out.

Thanks in Advance.

Single-sign-on between that version of ADAL for .Net and the Intune Xamarin.iOS bindings is not supported. I recommend you update to the latest stable version, which is currently 4.5.1:
https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory

Once you do this, the KeychainSecurityGroup property referenced in the documentation for our Xamarin.iOS bindings should be available to you.

@Kyle-Reis, Thanks for Suggestion, I have to doubt where can I need to set the KeychainSecurityGroup property of AuthenticationContext to the same value in all the applications.

I have been followed the below Reference URL for Above Clarification.

https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/wiki/Token-cache-serialization#enable-token-cache-sharing-across-ios-applications

I need to set this 4 steps to SSO with Broker,

1.Enable broker mode in your application code's call to the MS SDK.
2.Establish a new redirect URI and provide that to both the app and your app registration.
3.Registering a URL Scheme.
4.Add a permission to your info.plist file.

First point need to clarify to set the credentials type in Authentication object, where can I set this,Please confirm this
I can understand the 2 and 3 points then 4th.

Then coming to Project to declaration the Adal client id ,Adal authority,Adal redirect Uri to add as a Dictionary to IntuneMAMSettings in Info.plist. Please confirm this.is it Required or not, if required briefly explain with code or suggested docs.

Could you please clear my Doubt

I need to write the code in AppDelegate with ADAL SSO Authentication, like this below

IntuneMAMEnrollmentManager.Instance.RegisterAndEnrollAccount(string identity);

I need to pass identity as username or token because intune also have valid authentication required,

How can Intune have authicated for above code,Please provide valid suggested Url or doc.

With Broker SSO with Intune,

If you don't mind,Please clear and clarify my confusion and any misunderstanding for SSO with Broker (Intune)

Thanks in Advance.

@Kyle-Reis,Could you Please help me.for above clarification.

Hey @sureshbabu4, do you still need help here?

Hey @sureshbabu4, checking in again before closing out this issue. Are you still blocked?

Closing out this issue due to inactivity. Please reopen if you’re still having trouble.