What does SPO required mean for Azure Graph API / OneDrive API access to read files (list and download)

廉价感情. 提交于 2020-03-26 04:04:21

问题


I had assumed that OneDrive offers a free personal storage tier, so that API accesss to OneDrive should not require that the user has an Office 365 subscription...

However, after hours of debugging, and just going straight to Postman, after trying to call: https://graph.microsoft.com/v1.0/me/drive/root/search(q='.obj')?select=name,id,@content.downloadUrl using the token, the error returned seems to be that the user does not have SPO, which seems to mean Office365 subscription is required?

{
  "error": {
    "code": "BadRequest",
    "message": "Tenant does not have a SPO license.",
    "innerError": {
      "request-id": "270808a8-4763-4ada-a878-e5ff34571c2f",
      "date": "2020-02-20T06:08:52"
    }
  }
}

Is there a way to access OneDrive by API without needing Office?

Update, just bought Office 365 ... this error still occurs... What does SPO license mean exactly?


回答1:


What user context are you using to connect to the Microsoft Graph OneDrive API? Is that user licensed correctly in https://admin.microsoft.com/?

To eliminate issues with user access tokens, can you go to Graph Explorer https://aka.ms/ge and sign in on the left hand side with the user account. Then run this exact query. You will need to consent the correct permissions to call this API as per the API docs.

Because you are using SharePoint search capabilities here, this is not just OneDrive, this is SharePoint that will be required. I believe this comes with E3 and E5, but i'm not a licensing expert.

Can that user access the root SharePoint product within your tenant in a web browser?



来源:https://stackoverflow.com/questions/60313963/what-does-spo-required-mean-for-azure-graph-api-onedrive-api-access-to-read-fi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!