Tenant does not have a SPO license












1















I have an error while trying to use Microsoft Graph to write a script to upload an Excel file to OneDrive then read the Excel file.



I followed Microsoft documentation to obtain the access token without user. I successfully got an access token but I got an error while using the access token to call the OneDrive API.



Here is the response:



{
"error": {
"code": "BadRequest",
"message": "Tenant does not have a SPO license.",
"innerError": {
"request-id": "5ec31d17-3aea-469f-9078-de3608f11d0d",
"date": "2017-10-10T04:34:05"
}
}
}


I don't understand why I need to have SPO license while calling graph API and how to get it. Because of this error message so I'm trying to buy a SPO license.



According to this document, I think I should see many products in the license pages but while logging in with Azure Portal and go to the License page, I see only 2 products: Azure AD Premium and Enterprise Mobility Suite:



screenshot










share|improve this question

























  • Off topic as licensing question

    – bummi
    Oct 18 '17 at 4:15
















1















I have an error while trying to use Microsoft Graph to write a script to upload an Excel file to OneDrive then read the Excel file.



I followed Microsoft documentation to obtain the access token without user. I successfully got an access token but I got an error while using the access token to call the OneDrive API.



Here is the response:



{
"error": {
"code": "BadRequest",
"message": "Tenant does not have a SPO license.",
"innerError": {
"request-id": "5ec31d17-3aea-469f-9078-de3608f11d0d",
"date": "2017-10-10T04:34:05"
}
}
}


I don't understand why I need to have SPO license while calling graph API and how to get it. Because of this error message so I'm trying to buy a SPO license.



According to this document, I think I should see many products in the license pages but while logging in with Azure Portal and go to the License page, I see only 2 products: Azure AD Premium and Enterprise Mobility Suite:



screenshot










share|improve this question

























  • Off topic as licensing question

    – bummi
    Oct 18 '17 at 4:15














1












1








1








I have an error while trying to use Microsoft Graph to write a script to upload an Excel file to OneDrive then read the Excel file.



I followed Microsoft documentation to obtain the access token without user. I successfully got an access token but I got an error while using the access token to call the OneDrive API.



Here is the response:



{
"error": {
"code": "BadRequest",
"message": "Tenant does not have a SPO license.",
"innerError": {
"request-id": "5ec31d17-3aea-469f-9078-de3608f11d0d",
"date": "2017-10-10T04:34:05"
}
}
}


I don't understand why I need to have SPO license while calling graph API and how to get it. Because of this error message so I'm trying to buy a SPO license.



According to this document, I think I should see many products in the license pages but while logging in with Azure Portal and go to the License page, I see only 2 products: Azure AD Premium and Enterprise Mobility Suite:



screenshot










share|improve this question
















I have an error while trying to use Microsoft Graph to write a script to upload an Excel file to OneDrive then read the Excel file.



I followed Microsoft documentation to obtain the access token without user. I successfully got an access token but I got an error while using the access token to call the OneDrive API.



Here is the response:



{
"error": {
"code": "BadRequest",
"message": "Tenant does not have a SPO license.",
"innerError": {
"request-id": "5ec31d17-3aea-469f-9078-de3608f11d0d",
"date": "2017-10-10T04:34:05"
}
}
}


I don't understand why I need to have SPO license while calling graph API and how to get it. Because of this error message so I'm trying to buy a SPO license.



According to this document, I think I should see many products in the license pages but while logging in with Azure Portal and go to the License page, I see only 2 products: Azure AD Premium and Enterprise Mobility Suite:



screenshot







microsoft-graph onedrive






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 18 '17 at 11:30









Marc LaFleur

19.6k31934




19.6k31934










asked Oct 18 '17 at 2:49









Ken PhamKen Pham

84




84













  • Off topic as licensing question

    – bummi
    Oct 18 '17 at 4:15



















  • Off topic as licensing question

    – bummi
    Oct 18 '17 at 4:15

















Off topic as licensing question

– bummi
Oct 18 '17 at 4:15





Off topic as licensing question

– bummi
Oct 18 '17 at 4:15












4 Answers
4






active

oldest

votes


















2














Answering a couple of things here.



Background: Microsoft Graph is the developer gateway or API to many Microsoft cloud services, like Office 365, Azure Active Directory, EMS (Enterprise Mobility Suite), personal Outlook, personal OneDrive and more. Use of the API is free, but to access the data behind it, you need to actually have those services - in some cases they may be free and in other cases you may need to pay for them.



As for adding Office 365 to your existing tenant. I believe you've signed up for Azure using a Microsoft Account. This means that you already have an Azure Active Directory tenant. You can still purchase/acquire Office 365 for that tenant. All you need to do is create a new Azure AD user (not a Microsoft Account) in your tenant, and make them a company admin. Then you should be able to sign-up for Office 365 - if it asks if you already have a tenant or account, sign in with the AAD account you just created. And voila, you should have an Azure AD tenant with a subscription to Azure AND now a subscription to Office 365.



Hope this helps,






share|improve this answer
























  • Thank you very much, @Dan Kershaw - MSFT :). Your explanation helps me so much. I'll follow your instruction to get O365 subscription for my tenant. According to my needs (service to service call to upload excel file to Onedrive and use MS Excel API to read it), could you please tell me which product is appropriate for me products.office.com/en/…?

    – Ken Pham
    Oct 23 '17 at 3:07













  • All of them will work for you, since they all include the OneDrive service. Office 365 Business Essentials is the cheapest and probably best bet for you, since it actually will light up more of the Microsoft Graph functionality - should you in the future want to do more than just upload/manipulate Excel files in OneDrive.

    – Dan Kershaw - MSFT
    Oct 23 '17 at 16:44











  • Thank you very much, @Dan :).

    – Ken Pham
    Oct 24 '17 at 1:35



















0















  1. Are you able to access the OneDrive contents (including the Excel file) manually through browser after logging in with your account in the same tenant?


  2. If you are able to access the drive and file manually, please use Graph Explorer https://developer.microsoft.com/en-us/graph/graph-explorer to sign in using the same account and make the call to get the Drive contents. When you’re signing-in, you would be presented with a consent page listing the permissions needed to be granted. Please make a note of those permissions and check whether the permission match to those required for accessing the drive.


  3. If you do not have appropriate SPO license yet, you can try setting up a free Office-365 trial account (https://products.office.com/en-in/business/office-365-enterprise-e3-business-software) and test the APIs.







share|improve this answer
























  • 1. I'm able to access Onedrive site to upload an excel file then read it. 2. I'm able to use Graph Explore to access my root drive directory and I can see the uploaded file in the API's response. But I couldn't read the file by Excel API. I got this error: {"code": "generalException", "message": " Exception While Processing"}

    – Ken Pham
    Oct 19 '17 at 3:03













  • 3. I couldn't setup Office-365 with the Microsft account. It seems I need a work account to do what you suggested. But if I setup a work account, how I link this account to my existed tenant?

    – Ken Pham
    Oct 19 '17 at 3:06





















0














Both OneDrive for Business and the Excel APIs require Office 365. Based on your screenshot, this looks like a standalone Azure Active Directory tenant (i.e. not linked to O365).



The reason for the SPO License message is that OneDrive for Business is a special SharePoint Online document library that is automatically provisioned for users.






share|improve this answer
























  • Thank you for your help. Do you mean I'll able to use OneDrive and Excel APIs if I buy Office 365? My Microsoft account seems not able to buy Office 365, it seems only available for work account. If I sign up a work account and buy Office 365, how can I link it to my existing Azure Active Directory tenant?

    – Ken Pham
    Oct 19 '17 at 3:14











  • You can use these APIs with your Microsoft Account but you'll need to use the [v2 Endpoint](massivescale.com/microsoft-v2-endpoint-primer/). What you've used to register your app (from the screen shot) is v1 which only supports Work/School accounts.

    – Marc LaFleur
    Oct 19 '17 at 15:09











  • Thank you very much. I have read the post you sent. It does not work for me because what I'm trying to do is "service to service call". The APIs will be called in the background without user, without redirection. The idea is my app will generate a report (Excel file) and I need to upload it to Onedrive and have an ability to read that file (by using APIs). Everything will be uploaded/stored to my Onedrive. Do you think the V2 endpoint can support my needs? Or if you know anything else which can do that, could you please share it with me?

    – Ken Pham
    Oct 20 '17 at 4:22











  • You use to service to service (aka the Client Credentials flow) with personal (MSA) accounts. You can use this with work/school (AAD) tenants. This is because your personal OneDrive is part of a public tenant whereas OneDrive for Business is part of a private subscription. You'll need an commercial O365 tenant for this.

    – Marc LaFleur
    Oct 20 '17 at 13:33











  • Thank you for your help, @Marc LaFleur. I wonder if I can use work/school account for Client Credentials flow to access my personal Onedrive? I have tried this way before, but it was not successful. When using the public tenant (login.microsoftonline.com/common/oauth2/token) for my work/school account, I could obtain the API access token but I always got error 400 (Bad Request) while calling Onedrive API. Is there the document which can help me to work on this flow?

    – Ken Pham
    Oct 23 '17 at 3:21





















0














In case anyone else has a similar issue, I was getting the same error message when using an Office 365 Home license. It turns out SPO stands for SharePoint Online, and you need an Office 365 Business account to have it. So as far as I can tell, you can't use the Microsoft Graph API to access OneDrive without having SharePoint (which only comes with the business licenses). This isn't really made clear anywhere that I could find.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46802055%2ftenant-does-not-have-a-spo-license%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    4 Answers
    4






    active

    oldest

    votes








    4 Answers
    4






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    Answering a couple of things here.



    Background: Microsoft Graph is the developer gateway or API to many Microsoft cloud services, like Office 365, Azure Active Directory, EMS (Enterprise Mobility Suite), personal Outlook, personal OneDrive and more. Use of the API is free, but to access the data behind it, you need to actually have those services - in some cases they may be free and in other cases you may need to pay for them.



    As for adding Office 365 to your existing tenant. I believe you've signed up for Azure using a Microsoft Account. This means that you already have an Azure Active Directory tenant. You can still purchase/acquire Office 365 for that tenant. All you need to do is create a new Azure AD user (not a Microsoft Account) in your tenant, and make them a company admin. Then you should be able to sign-up for Office 365 - if it asks if you already have a tenant or account, sign in with the AAD account you just created. And voila, you should have an Azure AD tenant with a subscription to Azure AND now a subscription to Office 365.



    Hope this helps,






    share|improve this answer
























    • Thank you very much, @Dan Kershaw - MSFT :). Your explanation helps me so much. I'll follow your instruction to get O365 subscription for my tenant. According to my needs (service to service call to upload excel file to Onedrive and use MS Excel API to read it), could you please tell me which product is appropriate for me products.office.com/en/…?

      – Ken Pham
      Oct 23 '17 at 3:07













    • All of them will work for you, since they all include the OneDrive service. Office 365 Business Essentials is the cheapest and probably best bet for you, since it actually will light up more of the Microsoft Graph functionality - should you in the future want to do more than just upload/manipulate Excel files in OneDrive.

      – Dan Kershaw - MSFT
      Oct 23 '17 at 16:44











    • Thank you very much, @Dan :).

      – Ken Pham
      Oct 24 '17 at 1:35
















    2














    Answering a couple of things here.



    Background: Microsoft Graph is the developer gateway or API to many Microsoft cloud services, like Office 365, Azure Active Directory, EMS (Enterprise Mobility Suite), personal Outlook, personal OneDrive and more. Use of the API is free, but to access the data behind it, you need to actually have those services - in some cases they may be free and in other cases you may need to pay for them.



    As for adding Office 365 to your existing tenant. I believe you've signed up for Azure using a Microsoft Account. This means that you already have an Azure Active Directory tenant. You can still purchase/acquire Office 365 for that tenant. All you need to do is create a new Azure AD user (not a Microsoft Account) in your tenant, and make them a company admin. Then you should be able to sign-up for Office 365 - if it asks if you already have a tenant or account, sign in with the AAD account you just created. And voila, you should have an Azure AD tenant with a subscription to Azure AND now a subscription to Office 365.



    Hope this helps,






    share|improve this answer
























    • Thank you very much, @Dan Kershaw - MSFT :). Your explanation helps me so much. I'll follow your instruction to get O365 subscription for my tenant. According to my needs (service to service call to upload excel file to Onedrive and use MS Excel API to read it), could you please tell me which product is appropriate for me products.office.com/en/…?

      – Ken Pham
      Oct 23 '17 at 3:07













    • All of them will work for you, since they all include the OneDrive service. Office 365 Business Essentials is the cheapest and probably best bet for you, since it actually will light up more of the Microsoft Graph functionality - should you in the future want to do more than just upload/manipulate Excel files in OneDrive.

      – Dan Kershaw - MSFT
      Oct 23 '17 at 16:44











    • Thank you very much, @Dan :).

      – Ken Pham
      Oct 24 '17 at 1:35














    2












    2








    2







    Answering a couple of things here.



    Background: Microsoft Graph is the developer gateway or API to many Microsoft cloud services, like Office 365, Azure Active Directory, EMS (Enterprise Mobility Suite), personal Outlook, personal OneDrive and more. Use of the API is free, but to access the data behind it, you need to actually have those services - in some cases they may be free and in other cases you may need to pay for them.



    As for adding Office 365 to your existing tenant. I believe you've signed up for Azure using a Microsoft Account. This means that you already have an Azure Active Directory tenant. You can still purchase/acquire Office 365 for that tenant. All you need to do is create a new Azure AD user (not a Microsoft Account) in your tenant, and make them a company admin. Then you should be able to sign-up for Office 365 - if it asks if you already have a tenant or account, sign in with the AAD account you just created. And voila, you should have an Azure AD tenant with a subscription to Azure AND now a subscription to Office 365.



    Hope this helps,






    share|improve this answer













    Answering a couple of things here.



    Background: Microsoft Graph is the developer gateway or API to many Microsoft cloud services, like Office 365, Azure Active Directory, EMS (Enterprise Mobility Suite), personal Outlook, personal OneDrive and more. Use of the API is free, but to access the data behind it, you need to actually have those services - in some cases they may be free and in other cases you may need to pay for them.



    As for adding Office 365 to your existing tenant. I believe you've signed up for Azure using a Microsoft Account. This means that you already have an Azure Active Directory tenant. You can still purchase/acquire Office 365 for that tenant. All you need to do is create a new Azure AD user (not a Microsoft Account) in your tenant, and make them a company admin. Then you should be able to sign-up for Office 365 - if it asks if you already have a tenant or account, sign in with the AAD account you just created. And voila, you should have an Azure AD tenant with a subscription to Azure AND now a subscription to Office 365.



    Hope this helps,







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Oct 21 '17 at 23:24









    Dan Kershaw - MSFTDan Kershaw - MSFT

    4,7381616




    4,7381616













    • Thank you very much, @Dan Kershaw - MSFT :). Your explanation helps me so much. I'll follow your instruction to get O365 subscription for my tenant. According to my needs (service to service call to upload excel file to Onedrive and use MS Excel API to read it), could you please tell me which product is appropriate for me products.office.com/en/…?

      – Ken Pham
      Oct 23 '17 at 3:07













    • All of them will work for you, since they all include the OneDrive service. Office 365 Business Essentials is the cheapest and probably best bet for you, since it actually will light up more of the Microsoft Graph functionality - should you in the future want to do more than just upload/manipulate Excel files in OneDrive.

      – Dan Kershaw - MSFT
      Oct 23 '17 at 16:44











    • Thank you very much, @Dan :).

      – Ken Pham
      Oct 24 '17 at 1:35



















    • Thank you very much, @Dan Kershaw - MSFT :). Your explanation helps me so much. I'll follow your instruction to get O365 subscription for my tenant. According to my needs (service to service call to upload excel file to Onedrive and use MS Excel API to read it), could you please tell me which product is appropriate for me products.office.com/en/…?

      – Ken Pham
      Oct 23 '17 at 3:07













    • All of them will work for you, since they all include the OneDrive service. Office 365 Business Essentials is the cheapest and probably best bet for you, since it actually will light up more of the Microsoft Graph functionality - should you in the future want to do more than just upload/manipulate Excel files in OneDrive.

      – Dan Kershaw - MSFT
      Oct 23 '17 at 16:44











    • Thank you very much, @Dan :).

      – Ken Pham
      Oct 24 '17 at 1:35

















    Thank you very much, @Dan Kershaw - MSFT :). Your explanation helps me so much. I'll follow your instruction to get O365 subscription for my tenant. According to my needs (service to service call to upload excel file to Onedrive and use MS Excel API to read it), could you please tell me which product is appropriate for me products.office.com/en/…?

    – Ken Pham
    Oct 23 '17 at 3:07







    Thank you very much, @Dan Kershaw - MSFT :). Your explanation helps me so much. I'll follow your instruction to get O365 subscription for my tenant. According to my needs (service to service call to upload excel file to Onedrive and use MS Excel API to read it), could you please tell me which product is appropriate for me products.office.com/en/…?

    – Ken Pham
    Oct 23 '17 at 3:07















    All of them will work for you, since they all include the OneDrive service. Office 365 Business Essentials is the cheapest and probably best bet for you, since it actually will light up more of the Microsoft Graph functionality - should you in the future want to do more than just upload/manipulate Excel files in OneDrive.

    – Dan Kershaw - MSFT
    Oct 23 '17 at 16:44





    All of them will work for you, since they all include the OneDrive service. Office 365 Business Essentials is the cheapest and probably best bet for you, since it actually will light up more of the Microsoft Graph functionality - should you in the future want to do more than just upload/manipulate Excel files in OneDrive.

    – Dan Kershaw - MSFT
    Oct 23 '17 at 16:44













    Thank you very much, @Dan :).

    – Ken Pham
    Oct 24 '17 at 1:35





    Thank you very much, @Dan :).

    – Ken Pham
    Oct 24 '17 at 1:35













    0















    1. Are you able to access the OneDrive contents (including the Excel file) manually through browser after logging in with your account in the same tenant?


    2. If you are able to access the drive and file manually, please use Graph Explorer https://developer.microsoft.com/en-us/graph/graph-explorer to sign in using the same account and make the call to get the Drive contents. When you’re signing-in, you would be presented with a consent page listing the permissions needed to be granted. Please make a note of those permissions and check whether the permission match to those required for accessing the drive.


    3. If you do not have appropriate SPO license yet, you can try setting up a free Office-365 trial account (https://products.office.com/en-in/business/office-365-enterprise-e3-business-software) and test the APIs.







    share|improve this answer
























    • 1. I'm able to access Onedrive site to upload an excel file then read it. 2. I'm able to use Graph Explore to access my root drive directory and I can see the uploaded file in the API's response. But I couldn't read the file by Excel API. I got this error: {"code": "generalException", "message": " Exception While Processing"}

      – Ken Pham
      Oct 19 '17 at 3:03













    • 3. I couldn't setup Office-365 with the Microsft account. It seems I need a work account to do what you suggested. But if I setup a work account, how I link this account to my existed tenant?

      – Ken Pham
      Oct 19 '17 at 3:06


















    0















    1. Are you able to access the OneDrive contents (including the Excel file) manually through browser after logging in with your account in the same tenant?


    2. If you are able to access the drive and file manually, please use Graph Explorer https://developer.microsoft.com/en-us/graph/graph-explorer to sign in using the same account and make the call to get the Drive contents. When you’re signing-in, you would be presented with a consent page listing the permissions needed to be granted. Please make a note of those permissions and check whether the permission match to those required for accessing the drive.


    3. If you do not have appropriate SPO license yet, you can try setting up a free Office-365 trial account (https://products.office.com/en-in/business/office-365-enterprise-e3-business-software) and test the APIs.







    share|improve this answer
























    • 1. I'm able to access Onedrive site to upload an excel file then read it. 2. I'm able to use Graph Explore to access my root drive directory and I can see the uploaded file in the API's response. But I couldn't read the file by Excel API. I got this error: {"code": "generalException", "message": " Exception While Processing"}

      – Ken Pham
      Oct 19 '17 at 3:03













    • 3. I couldn't setup Office-365 with the Microsft account. It seems I need a work account to do what you suggested. But if I setup a work account, how I link this account to my existed tenant?

      – Ken Pham
      Oct 19 '17 at 3:06
















    0












    0








    0








    1. Are you able to access the OneDrive contents (including the Excel file) manually through browser after logging in with your account in the same tenant?


    2. If you are able to access the drive and file manually, please use Graph Explorer https://developer.microsoft.com/en-us/graph/graph-explorer to sign in using the same account and make the call to get the Drive contents. When you’re signing-in, you would be presented with a consent page listing the permissions needed to be granted. Please make a note of those permissions and check whether the permission match to those required for accessing the drive.


    3. If you do not have appropriate SPO license yet, you can try setting up a free Office-365 trial account (https://products.office.com/en-in/business/office-365-enterprise-e3-business-software) and test the APIs.







    share|improve this answer














    1. Are you able to access the OneDrive contents (including the Excel file) manually through browser after logging in with your account in the same tenant?


    2. If you are able to access the drive and file manually, please use Graph Explorer https://developer.microsoft.com/en-us/graph/graph-explorer to sign in using the same account and make the call to get the Drive contents. When you’re signing-in, you would be presented with a consent page listing the permissions needed to be granted. Please make a note of those permissions and check whether the permission match to those required for accessing the drive.


    3. If you do not have appropriate SPO license yet, you can try setting up a free Office-365 trial account (https://products.office.com/en-in/business/office-365-enterprise-e3-business-software) and test the APIs.








    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Oct 18 '17 at 11:29









    MKumarMKumar

    1




    1













    • 1. I'm able to access Onedrive site to upload an excel file then read it. 2. I'm able to use Graph Explore to access my root drive directory and I can see the uploaded file in the API's response. But I couldn't read the file by Excel API. I got this error: {"code": "generalException", "message": " Exception While Processing"}

      – Ken Pham
      Oct 19 '17 at 3:03













    • 3. I couldn't setup Office-365 with the Microsft account. It seems I need a work account to do what you suggested. But if I setup a work account, how I link this account to my existed tenant?

      – Ken Pham
      Oct 19 '17 at 3:06





















    • 1. I'm able to access Onedrive site to upload an excel file then read it. 2. I'm able to use Graph Explore to access my root drive directory and I can see the uploaded file in the API's response. But I couldn't read the file by Excel API. I got this error: {"code": "generalException", "message": " Exception While Processing"}

      – Ken Pham
      Oct 19 '17 at 3:03













    • 3. I couldn't setup Office-365 with the Microsft account. It seems I need a work account to do what you suggested. But if I setup a work account, how I link this account to my existed tenant?

      – Ken Pham
      Oct 19 '17 at 3:06



















    1. I'm able to access Onedrive site to upload an excel file then read it. 2. I'm able to use Graph Explore to access my root drive directory and I can see the uploaded file in the API's response. But I couldn't read the file by Excel API. I got this error: {"code": "generalException", "message": " Exception While Processing"}

    – Ken Pham
    Oct 19 '17 at 3:03







    1. I'm able to access Onedrive site to upload an excel file then read it. 2. I'm able to use Graph Explore to access my root drive directory and I can see the uploaded file in the API's response. But I couldn't read the file by Excel API. I got this error: {"code": "generalException", "message": " Exception While Processing"}

    – Ken Pham
    Oct 19 '17 at 3:03















    3. I couldn't setup Office-365 with the Microsft account. It seems I need a work account to do what you suggested. But if I setup a work account, how I link this account to my existed tenant?

    – Ken Pham
    Oct 19 '17 at 3:06







    3. I couldn't setup Office-365 with the Microsft account. It seems I need a work account to do what you suggested. But if I setup a work account, how I link this account to my existed tenant?

    – Ken Pham
    Oct 19 '17 at 3:06













    0














    Both OneDrive for Business and the Excel APIs require Office 365. Based on your screenshot, this looks like a standalone Azure Active Directory tenant (i.e. not linked to O365).



    The reason for the SPO License message is that OneDrive for Business is a special SharePoint Online document library that is automatically provisioned for users.






    share|improve this answer
























    • Thank you for your help. Do you mean I'll able to use OneDrive and Excel APIs if I buy Office 365? My Microsoft account seems not able to buy Office 365, it seems only available for work account. If I sign up a work account and buy Office 365, how can I link it to my existing Azure Active Directory tenant?

      – Ken Pham
      Oct 19 '17 at 3:14











    • You can use these APIs with your Microsoft Account but you'll need to use the [v2 Endpoint](massivescale.com/microsoft-v2-endpoint-primer/). What you've used to register your app (from the screen shot) is v1 which only supports Work/School accounts.

      – Marc LaFleur
      Oct 19 '17 at 15:09











    • Thank you very much. I have read the post you sent. It does not work for me because what I'm trying to do is "service to service call". The APIs will be called in the background without user, without redirection. The idea is my app will generate a report (Excel file) and I need to upload it to Onedrive and have an ability to read that file (by using APIs). Everything will be uploaded/stored to my Onedrive. Do you think the V2 endpoint can support my needs? Or if you know anything else which can do that, could you please share it with me?

      – Ken Pham
      Oct 20 '17 at 4:22











    • You use to service to service (aka the Client Credentials flow) with personal (MSA) accounts. You can use this with work/school (AAD) tenants. This is because your personal OneDrive is part of a public tenant whereas OneDrive for Business is part of a private subscription. You'll need an commercial O365 tenant for this.

      – Marc LaFleur
      Oct 20 '17 at 13:33











    • Thank you for your help, @Marc LaFleur. I wonder if I can use work/school account for Client Credentials flow to access my personal Onedrive? I have tried this way before, but it was not successful. When using the public tenant (login.microsoftonline.com/common/oauth2/token) for my work/school account, I could obtain the API access token but I always got error 400 (Bad Request) while calling Onedrive API. Is there the document which can help me to work on this flow?

      – Ken Pham
      Oct 23 '17 at 3:21


















    0














    Both OneDrive for Business and the Excel APIs require Office 365. Based on your screenshot, this looks like a standalone Azure Active Directory tenant (i.e. not linked to O365).



    The reason for the SPO License message is that OneDrive for Business is a special SharePoint Online document library that is automatically provisioned for users.






    share|improve this answer
























    • Thank you for your help. Do you mean I'll able to use OneDrive and Excel APIs if I buy Office 365? My Microsoft account seems not able to buy Office 365, it seems only available for work account. If I sign up a work account and buy Office 365, how can I link it to my existing Azure Active Directory tenant?

      – Ken Pham
      Oct 19 '17 at 3:14











    • You can use these APIs with your Microsoft Account but you'll need to use the [v2 Endpoint](massivescale.com/microsoft-v2-endpoint-primer/). What you've used to register your app (from the screen shot) is v1 which only supports Work/School accounts.

      – Marc LaFleur
      Oct 19 '17 at 15:09











    • Thank you very much. I have read the post you sent. It does not work for me because what I'm trying to do is "service to service call". The APIs will be called in the background without user, without redirection. The idea is my app will generate a report (Excel file) and I need to upload it to Onedrive and have an ability to read that file (by using APIs). Everything will be uploaded/stored to my Onedrive. Do you think the V2 endpoint can support my needs? Or if you know anything else which can do that, could you please share it with me?

      – Ken Pham
      Oct 20 '17 at 4:22











    • You use to service to service (aka the Client Credentials flow) with personal (MSA) accounts. You can use this with work/school (AAD) tenants. This is because your personal OneDrive is part of a public tenant whereas OneDrive for Business is part of a private subscription. You'll need an commercial O365 tenant for this.

      – Marc LaFleur
      Oct 20 '17 at 13:33











    • Thank you for your help, @Marc LaFleur. I wonder if I can use work/school account for Client Credentials flow to access my personal Onedrive? I have tried this way before, but it was not successful. When using the public tenant (login.microsoftonline.com/common/oauth2/token) for my work/school account, I could obtain the API access token but I always got error 400 (Bad Request) while calling Onedrive API. Is there the document which can help me to work on this flow?

      – Ken Pham
      Oct 23 '17 at 3:21
















    0












    0








    0







    Both OneDrive for Business and the Excel APIs require Office 365. Based on your screenshot, this looks like a standalone Azure Active Directory tenant (i.e. not linked to O365).



    The reason for the SPO License message is that OneDrive for Business is a special SharePoint Online document library that is automatically provisioned for users.






    share|improve this answer













    Both OneDrive for Business and the Excel APIs require Office 365. Based on your screenshot, this looks like a standalone Azure Active Directory tenant (i.e. not linked to O365).



    The reason for the SPO License message is that OneDrive for Business is a special SharePoint Online document library that is automatically provisioned for users.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Oct 18 '17 at 11:51









    Marc LaFleurMarc LaFleur

    19.6k31934




    19.6k31934













    • Thank you for your help. Do you mean I'll able to use OneDrive and Excel APIs if I buy Office 365? My Microsoft account seems not able to buy Office 365, it seems only available for work account. If I sign up a work account and buy Office 365, how can I link it to my existing Azure Active Directory tenant?

      – Ken Pham
      Oct 19 '17 at 3:14











    • You can use these APIs with your Microsoft Account but you'll need to use the [v2 Endpoint](massivescale.com/microsoft-v2-endpoint-primer/). What you've used to register your app (from the screen shot) is v1 which only supports Work/School accounts.

      – Marc LaFleur
      Oct 19 '17 at 15:09











    • Thank you very much. I have read the post you sent. It does not work for me because what I'm trying to do is "service to service call". The APIs will be called in the background without user, without redirection. The idea is my app will generate a report (Excel file) and I need to upload it to Onedrive and have an ability to read that file (by using APIs). Everything will be uploaded/stored to my Onedrive. Do you think the V2 endpoint can support my needs? Or if you know anything else which can do that, could you please share it with me?

      – Ken Pham
      Oct 20 '17 at 4:22











    • You use to service to service (aka the Client Credentials flow) with personal (MSA) accounts. You can use this with work/school (AAD) tenants. This is because your personal OneDrive is part of a public tenant whereas OneDrive for Business is part of a private subscription. You'll need an commercial O365 tenant for this.

      – Marc LaFleur
      Oct 20 '17 at 13:33











    • Thank you for your help, @Marc LaFleur. I wonder if I can use work/school account for Client Credentials flow to access my personal Onedrive? I have tried this way before, but it was not successful. When using the public tenant (login.microsoftonline.com/common/oauth2/token) for my work/school account, I could obtain the API access token but I always got error 400 (Bad Request) while calling Onedrive API. Is there the document which can help me to work on this flow?

      – Ken Pham
      Oct 23 '17 at 3:21





















    • Thank you for your help. Do you mean I'll able to use OneDrive and Excel APIs if I buy Office 365? My Microsoft account seems not able to buy Office 365, it seems only available for work account. If I sign up a work account and buy Office 365, how can I link it to my existing Azure Active Directory tenant?

      – Ken Pham
      Oct 19 '17 at 3:14











    • You can use these APIs with your Microsoft Account but you'll need to use the [v2 Endpoint](massivescale.com/microsoft-v2-endpoint-primer/). What you've used to register your app (from the screen shot) is v1 which only supports Work/School accounts.

      – Marc LaFleur
      Oct 19 '17 at 15:09











    • Thank you very much. I have read the post you sent. It does not work for me because what I'm trying to do is "service to service call". The APIs will be called in the background without user, without redirection. The idea is my app will generate a report (Excel file) and I need to upload it to Onedrive and have an ability to read that file (by using APIs). Everything will be uploaded/stored to my Onedrive. Do you think the V2 endpoint can support my needs? Or if you know anything else which can do that, could you please share it with me?

      – Ken Pham
      Oct 20 '17 at 4:22











    • You use to service to service (aka the Client Credentials flow) with personal (MSA) accounts. You can use this with work/school (AAD) tenants. This is because your personal OneDrive is part of a public tenant whereas OneDrive for Business is part of a private subscription. You'll need an commercial O365 tenant for this.

      – Marc LaFleur
      Oct 20 '17 at 13:33











    • Thank you for your help, @Marc LaFleur. I wonder if I can use work/school account for Client Credentials flow to access my personal Onedrive? I have tried this way before, but it was not successful. When using the public tenant (login.microsoftonline.com/common/oauth2/token) for my work/school account, I could obtain the API access token but I always got error 400 (Bad Request) while calling Onedrive API. Is there the document which can help me to work on this flow?

      – Ken Pham
      Oct 23 '17 at 3:21



















    Thank you for your help. Do you mean I'll able to use OneDrive and Excel APIs if I buy Office 365? My Microsoft account seems not able to buy Office 365, it seems only available for work account. If I sign up a work account and buy Office 365, how can I link it to my existing Azure Active Directory tenant?

    – Ken Pham
    Oct 19 '17 at 3:14





    Thank you for your help. Do you mean I'll able to use OneDrive and Excel APIs if I buy Office 365? My Microsoft account seems not able to buy Office 365, it seems only available for work account. If I sign up a work account and buy Office 365, how can I link it to my existing Azure Active Directory tenant?

    – Ken Pham
    Oct 19 '17 at 3:14













    You can use these APIs with your Microsoft Account but you'll need to use the [v2 Endpoint](massivescale.com/microsoft-v2-endpoint-primer/). What you've used to register your app (from the screen shot) is v1 which only supports Work/School accounts.

    – Marc LaFleur
    Oct 19 '17 at 15:09





    You can use these APIs with your Microsoft Account but you'll need to use the [v2 Endpoint](massivescale.com/microsoft-v2-endpoint-primer/). What you've used to register your app (from the screen shot) is v1 which only supports Work/School accounts.

    – Marc LaFleur
    Oct 19 '17 at 15:09













    Thank you very much. I have read the post you sent. It does not work for me because what I'm trying to do is "service to service call". The APIs will be called in the background without user, without redirection. The idea is my app will generate a report (Excel file) and I need to upload it to Onedrive and have an ability to read that file (by using APIs). Everything will be uploaded/stored to my Onedrive. Do you think the V2 endpoint can support my needs? Or if you know anything else which can do that, could you please share it with me?

    – Ken Pham
    Oct 20 '17 at 4:22





    Thank you very much. I have read the post you sent. It does not work for me because what I'm trying to do is "service to service call". The APIs will be called in the background without user, without redirection. The idea is my app will generate a report (Excel file) and I need to upload it to Onedrive and have an ability to read that file (by using APIs). Everything will be uploaded/stored to my Onedrive. Do you think the V2 endpoint can support my needs? Or if you know anything else which can do that, could you please share it with me?

    – Ken Pham
    Oct 20 '17 at 4:22













    You use to service to service (aka the Client Credentials flow) with personal (MSA) accounts. You can use this with work/school (AAD) tenants. This is because your personal OneDrive is part of a public tenant whereas OneDrive for Business is part of a private subscription. You'll need an commercial O365 tenant for this.

    – Marc LaFleur
    Oct 20 '17 at 13:33





    You use to service to service (aka the Client Credentials flow) with personal (MSA) accounts. You can use this with work/school (AAD) tenants. This is because your personal OneDrive is part of a public tenant whereas OneDrive for Business is part of a private subscription. You'll need an commercial O365 tenant for this.

    – Marc LaFleur
    Oct 20 '17 at 13:33













    Thank you for your help, @Marc LaFleur. I wonder if I can use work/school account for Client Credentials flow to access my personal Onedrive? I have tried this way before, but it was not successful. When using the public tenant (login.microsoftonline.com/common/oauth2/token) for my work/school account, I could obtain the API access token but I always got error 400 (Bad Request) while calling Onedrive API. Is there the document which can help me to work on this flow?

    – Ken Pham
    Oct 23 '17 at 3:21







    Thank you for your help, @Marc LaFleur. I wonder if I can use work/school account for Client Credentials flow to access my personal Onedrive? I have tried this way before, but it was not successful. When using the public tenant (login.microsoftonline.com/common/oauth2/token) for my work/school account, I could obtain the API access token but I always got error 400 (Bad Request) while calling Onedrive API. Is there the document which can help me to work on this flow?

    – Ken Pham
    Oct 23 '17 at 3:21













    0














    In case anyone else has a similar issue, I was getting the same error message when using an Office 365 Home license. It turns out SPO stands for SharePoint Online, and you need an Office 365 Business account to have it. So as far as I can tell, you can't use the Microsoft Graph API to access OneDrive without having SharePoint (which only comes with the business licenses). This isn't really made clear anywhere that I could find.






    share|improve this answer




























      0














      In case anyone else has a similar issue, I was getting the same error message when using an Office 365 Home license. It turns out SPO stands for SharePoint Online, and you need an Office 365 Business account to have it. So as far as I can tell, you can't use the Microsoft Graph API to access OneDrive without having SharePoint (which only comes with the business licenses). This isn't really made clear anywhere that I could find.






      share|improve this answer


























        0












        0








        0







        In case anyone else has a similar issue, I was getting the same error message when using an Office 365 Home license. It turns out SPO stands for SharePoint Online, and you need an Office 365 Business account to have it. So as far as I can tell, you can't use the Microsoft Graph API to access OneDrive without having SharePoint (which only comes with the business licenses). This isn't really made clear anywhere that I could find.






        share|improve this answer













        In case anyone else has a similar issue, I was getting the same error message when using an Office 365 Home license. It turns out SPO stands for SharePoint Online, and you need an Office 365 Business account to have it. So as far as I can tell, you can't use the Microsoft Graph API to access OneDrive without having SharePoint (which only comes with the business licenses). This isn't really made clear anywhere that I could find.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 7 at 4:31









        crimson_penguincrimson_penguin

        2,27711020




        2,27711020






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46802055%2ftenant-does-not-have-a-spo-license%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Tonle Sap (See)

            I get strange results when I access the Sqlitedatabase with Unity C# via XAMPP

            Guatemaltekische Davis-Cup-Mannschaft