Mobile applications obtain permissions from users to access device sensors and APIs. Once a user provides or denies permissions, the choice is permanent, unless the user chooses to change it manually and use of sensor data by the app is not within the user’s control. The techniques of this disclosure enable dynamic management of permissions provided to application software, e.g., mobile apps, based on user context. With user permission, a machine-learning model is trained based on contextual data and events, and corresponding app permission settings. The trained model provides predictions of when modifications to app permissions may be suitable. Based on the model predictions, users are notified to make such changes. If users permit, such permission changes are performed automatically when the prediction is associated with high confidence.