More general query and better logging
Query for Scope:0 doesn't work for everyone. Query for current user will. Logging will prompt user to set up a Permitted App.