OneDrive / onedrive-sdk-android

OneDrive SDK for Android!
https://dev.onedrive.com
Other
148 stars 52 forks source link

Use of deprecated Discovery Service API #152

Closed sgong-pdftron closed 1 month ago

sgong-pdftron commented 5 years ago

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.

sumurthy commented 5 years 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/

sgong-pdftron commented 5 years ago

@sumurthy Hi, could you elaborate on upgrade to which SDK? Is there a new version of OneDrive SDK for Android available?

relyt29 commented 5 years ago

+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)
keeblebogdan commented 5 years ago

Does anybody here have a solution for this issue?

relyt29 commented 5 years ago

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.

bubbleguuum commented 4 years ago

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...

baywet commented 1 month ago

Thank you for reaching out and for your patience. This SDK is being officially deprecated. See #172 for more information