microsoftgraph / msgraph-sdk-android

Microsoft Graph SDK for Android! https://graph.microsoft.io
Other
51 stars 43 forks source link

Bad request when I POST a create sharing link for an MSA user. #75

Closed JohnMAustin78 closed 4 years ago

JohnMAustin78 commented 6 years ago

the Graph SDK is generating an invalid request when attempting to create a sharing link to a file in consumer OneDrive.

Expected: {"type":"view"} Actual: {"scope":"anonymous", "type":"view"}

Generated by the Android SDK: POST https://graph.microsoft.com/v1.0/me/drive/items/F10...48/microsoft.graph.createLink SdkVersion : graph-android-v1.5.0 Authorization : Bearer EwBAA8l6BAAURSN/FHlDW5xN74t[...] SampleID : android-java-connect-sample {"scope":"","type":"view"}
400 : Bad Request [...]

Generated by the .NET Graph SDK:

POST https://graph.microsoft.com/v1.0/me/drive/items/F1026DF63D1DE9B2!280048/microsoft.graph.createLink HTTP/1.1

SdkVersion: Graph-dotnet-1.7.0 Authorization: bearer EwBAA8l6BAAURSN/FHl...W5Ag== SampleID: console-csharp-snippets-sample Cache-Control: no-store, no-cache Content-Type: application/json Host: graph.microsoft.com Content-Length: 15 Expect: 100-continue

{"type":"view"} HTTP/1.1 201 Created Cache-Control: private Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 Location: https://s2s-api.onedrive.com/v1.0/drives('me')/items('F1026DF63D1DE9B2!280048')/permissions('5uXgwO-M3g9r_oIIvd4Sp2sPVfY'),https://graph.microsoft.com request-id: cc16d3cc-3345-44c4-8845-04c9d61afe85 client-request-id: cc16d3cc-3345-44c4-8845-04c9d61afe85 x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"West US 2","Slice":"SliceA","Ring":"4","ScaleUnit":"000","Host":"AGSFE_IN_9","ADSiteName":"WUS2"}} OData-Version: 4.0 Duration: 580.5377 Strict-Transport-Security: max-age=31536000 Date: Fri, 09 Mar 2018 20:20:47 GMT Content-Length: 332

{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#permission","@odata.type":"#microsoft.graph.permission","id":"5uXgwO-M3g9r_oIIvd4Sp2sPVfY","link":{"application":{"id":"4c210682"},"type":"view","webUrl":"https://1drv.ms/u/s!ArLpHT32bQLxkYtw4Xx7zivwWw7_IA"},"roles":["read"],"shareId":"s!ArLpHT32bQLxkYtw4Xx7zivwWw7_IA"}

baywet commented 4 years ago

Hi everyone, Thank you for the contribution, we have moved away from an android specific SDK to a Java SDK and this repo will be archived very soon. If you're still facing the same issue with the Java SDK, feel free to re-open an issue over there. Closing.