We are upgrading our OAuth1 Google Apps marketplace app to OAuth2 On upgrade old app is uninstalled, new app is installed but data access is not granted automatically
Old app scopes:
https://apps-apis.google.com/a/feeds/user/#readonly # provisioning API
New app scopes:
https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/userinfo.profile
https://www.googleapis.com/auth/admin.directory.user.readonly # directory_v1 API
https://www.googleapis.com/auth/appsmarketplace.license
I don't understand were is the problem. AFAIK In old OAuth1 apps userinfo and LicensingAPI access was enabled automatically. ProvisioningAPI and Directory_v1 scopes match. What we should change to grant data access automatically on upgrade.