Office365 SharePoint REST api authentication from Xamarin mobile phone app -


i'm in process of developing mobile app using xamarin. app needs authenticate office365 sharepoint online instance. since built in xamarin app, cannot use references towards microsoft.sharepoint.client. means have hard way (as far can tell , find online) using tokens , cookies. have gotten work using class found @ following github:

https://github.com/jwillmer/sharepointauthentication

what create post request saml token @ using soap envelope url , username/password data, posts towards:

https://login.microsoftonline.com/extsts.srf

it uses saml token returned in subsequent post request to:

https://[yoururl].sharepoint.com/_forms/default.aspx?wa=wsignin1.0

this returns both fedauth , rtfa cookie , use 2 cookies in subsequent requests sharepoint authentication. works charm when user has office365 account logging in. cookies retrieved without problem. however, not users log sharepoint online instance have office365 account. granted access through own personal microsoft live id account (not linked office365 account).

using code above in live id scenario works, until retrieval of 2 auth cookies. saml token generated, when posting signin form no cookies returned. instead, error page returned stating:

we're sorry [emailaddress] can't found in [yoururl].sharepoint.com directory. issue type: invalid partner login.

how can make sure both types of users can login app , can retrieve data sharepoint instance? or there alternatives doing way? rest api mentioned everywhere go-to solution querying data non-sharepoint enabled platform details authentication in such scenario seem hard come across. i'm open kind of idea or solution @ point, because can't seem crack conundrum.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -