Closed sgong-pdftron closed 1 month ago
The discovery API is being deprecated. Please upgrade the SDK or mark as not supported.
Refer here for details: https://developer.microsoft.com/en-us/office/blogs/upcoming-deprecation-of-discovery-service-api/
@sumurthy Hi, could you elaborate on upgrade to which SDK? Is there a new version of OneDrive SDK for Android available?
+1 This SDK now fails to authenticate, as far as I can tell
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: OneDrive Service exception Error code: 101, Microsoft.Online.Services.O365Discovery.O365DiscoveryException
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: Error message: The app ID is blocked for access of the O365 Discovery Service.
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320:
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: GET https://api.office.com/discovery/v2.0/me/Services
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: Authorization : bearer REDACTED[...]
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: X-RequestStats : SDK-Version=Android-v1.3.1
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320:
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320:
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: 403 : Forbidden
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: [...]
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320:
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: [Some information was truncated for brevity, enable debug logging for more details]
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: com.onedrive.sdk.http.OneDriveServiceException: Error code: 101, Microsoft.Online.Services.O365Discovery.O365DiscoveryException
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: Error message: The app ID is blocked for access of the O365 Discovery Service.
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320:
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: GET https://api.office.com/discovery/v2.0/me/Services
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: Authorization : bearer REDACTED[...]
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: X-RequestStats : SDK-Version=Android-v1.3.1
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320:
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320:
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: 403 : Forbidden
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: [...]
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320:
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: [Some information was truncated for brevity, enable debug logging for more details]
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: at com.onedrive.sdk.http.DefaultHttpProvider.handleErrorResponse(DefaultHttpProvider.java:343)
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: at com.onedrive.sdk.http.DefaultHttpProvider.sendRequestInternal(DefaultHttpProvider.java:278)
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: at com.onedrive.sdk.http.DefaultHttpProvider.send(DefaultHttpProvider.java:184)
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: at com.onedrive.sdk.http.DefaultHttpProvider.send(DefaultHttpProvider.java:165)
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: at com.onedrive.sdk.authentication.ADALAuthenticator.getOneDriveServiceInfoFromDiscoveryService(ADALAuthenticator.java:619)
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: at com.onedrive.sdk.authentication.ADALAuthenticator.login(ADALAuthenticator.java:305)
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: at com.onedrive.sdk.authentication.DisambiguationAuthenticator.login(DisambiguationAuthenticator.java:216)
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: at com.onedrive.sdk.extensions.OneDriveClient$Builder.loginAndBuildClient(OneDriveClient.java:172)
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: at com.onedrive.sdk.extensions.OneDriveClient$Builder.access$500(OneDriveClient.java:64)
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: at com.onedrive.sdk.extensions.OneDriveClient$Builder$1.run(OneDriveClient.java:147)
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
09-25 16:07:09.539 18677 18773 E DefaultHttpProvider[sendRequestInternal] - 320: at java.lang.Thread.run(Thread.java:919)
Does anybody here have a solution for this issue?
I used https://github.com/Azure-Samples/ms-identity-android-native and the graph drive REST API with android's volley library to get access to the data I was looking for.
MS folks should mark in the ReadMe of this project that it is abandoned and deprecated, IMO.
It should be clearly stated in the top README that ADALAuthenticator cannot be used anymore with this library. MSAAuthenticator is fine.
Microsoft Android libraries are made of pile and pile of obsolete deprecated code and samples. It's really hard to understand what is up to date and actually works...
Thank you for reaching out and for your patience. This SDK is being officially deprecated. See #172 for more information
This project still uses the deprecated Discovery Service API, for example: https://github.com/OneDrive/onedrive-sdk-android/blob/1af2f0e788b180e91c6b0d4c52d87d4e11c07334/onedrivesdk/src/main/java/com/onedrive/sdk/authentication/ADALAuthenticator.java
It is announced in August 12, 2019 that this API is deprecated.
Is there any plan to update this project to use new Graph API?
Thanks.