cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vshah2
Helper I
Helper I

Powerapps offline authentication

Hello Team,

 

I'm trying to understand how the authentication is done in powerapps specially when the user is offline.

 

Meaning, When i turn on the airplane mode on my cell phone, I can still log in to my powerapps, how does the authentication works offline? I request you if you can share any good article that explains this offline authentication mechanism. 

 

Thanks. 

4 REPLIES 4
Pstork1
Dual Super User
Dual Super User

I'm not sure what you mean in this context by authentication.  When you put your phone in airplane mode you can only run apps that have already been cached on your phone using data that is already cached on your phone.  you authenticate to the application on your phone while you are online and then use the cached copy on your phone when in airplane mode.  There is no authentication, other than any security features built into your phone, that happens when you are offline.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365 and PWR EduCon in Chicago
EduCon Chicago 2022

Thanks for the reply. So if I understand correctly, In order to use the power apps offline, the app with the data has to be cache on local device and when you open the app offline, NO AUTHENTICATION DONE.

 

When you go online from offline and if the authentication is successful, then It will sync the data to data source. 

 

is it correct understanding?

 

Thanks.

Eelman
Community Champion
Community Champion

@vshah2 

This may not be what you are asking, but PowerApps doesn't send your data back to the data source automatically when you return from offline mode to online mode. You have to manage that using LoadData and Patch/Collect/etc.

 

LoadData takes the data saved to the device (using SaveData), and creates an inApp collection. You then need to Patch this collection to your data source. 

 

The Patch doesn't know which records to Patch either. For example, if in Offline mode you have Removed/Edited/Added to any records you have to design your Patch code to handle all of these changes. I have a video link somewhere that demonstrates a way to handle all of these three actions.

 

I'm currently working through the issues around Online/Offline mode.

Pstork1
Dual Super User
Dual Super User

Close, but not quite.  The authentication of the App is by OAUth, not by user credentials.  The OAUth authentication is created based on a user's credentials and is periodically renewed.  So when you go back online the OAUth authentication will be used to authenticate.  The user will only need to supply credentials if the OAUth authentication has expired.

 

Also, going online won't automatically sync the data back to the data source.  You have to sense that the data source is back online and tell the app to sync changes back. Offline apps are designed to work off a local collection for a data source.  Changes to that collection made while offline will then need to be synced back to the original data source when you go back online.  Authentication will take place automatically, but the changes need to be manually synced by your app.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365 and PWR EduCon in Chicago
EduCon Chicago 2022

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (3,837)