BlackSheep-1552 avatar image
0 Votes"
BlackSheep-1552 asked ScottThomson-2799 commented

How to implement offline sync with local sqlite xamarin forms?

Hi, I'm creating a mobile app using Xamarin forms and data is being stored in a local SQLite database. I want multiple users to be able to access and change this data in real time and it to sync over Azure. I've already got authentication through B2C so I'd like all of my sync calls to go through my functions apps so that it can check their credentials with my B2C. I tried following Microsoft courses AZR110 and AZR115 but it looks like they are deprecated as they are telling me to use the 'Mobile App' Azure service and I can't find that service anywhere in the Azure portal. Is there an Azure product that can sync SQLite data without me having to basically code the all of the sync logic?

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello Blacksheep

How did you go with your question above? I have been doing this using an Azure Mobile App and MobileServiceClient to sync offline with azure database so can point you to sample code for it.

I have struck a problem myself though once I implemented B2C authentication having an issue with PushAsync now and cant get through to the database


1 Vote 1 ·


I seem to be following right behind you on the same discovery. Ran into the Sqlite problem that you reported on a different thread. Not quite to the authentication quite yet. Curious to know how much progress you made


0 Votes 0 ·

Matt Im still stuck with getting through to the Azure SQL database with B2C activated. Ive posted the problem on stackoverflow but not much help yet. I am doing a 5 day azure training course next week so hoping this will give me better knowledge.

What I used for offline sync is the Mobile Service Client library which provides async post, get, put etc to the azure database connected to a azure mobile app so it deals with the offline/local database actions. I got this to work perfectly using the EasyAuth authentication but this doesnt allow you to accept customers only microsoft account holders.

When Azure refers to a "Azure Mobile App" then I suspect this is essentially just what they now generically call their "App Service". You can configure this as Web App or a Native App. Native in this case can be taken as "mobile" maybe?. Why I think this because as you say there is no sign of a "Mobile App" in azure portal.

maybe we will get a professional xamarin/azure developer who might tell us what is the "industry standard". Biggest issue Ive found Matt is learning how Azure works and should be configured because again theres several ways to architect eg easyAuth, B2C, RESTful web API, native App, functions, api management BUT NOT ONE DECENT SET OF INSTRUCTIONS that shows me how to implement with B2C with microsoft service client. End points, URLs, URIs, token audiences. Driving me crazy.

If you want to talk more let me know and I will give you my email

0 Votes 0 ·

1 Answer

ErikEJ avatar image
1 Vote"
ErikEJ answered vipulsparsh-MSFT commented

Have a look at this library

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


I just wanted to check in and see if you had any other questions or if you were able to resolve this issue?

If you have any other questions, please let me know.
Thank you for your time and patience throughout this issue.

Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

0 Votes 0 ·