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.
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.
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?
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.
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.
So many events that are happening this month - don't miss out!
Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.
Your chance to join an engaging competition of Power Platform enthusiasts.