none
Tenant does not have a SPO license RRS feed

  • 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

    Wednesday, April 15, 2020 10:13 AM

All replies

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

    I hope this information on Microsoft EMS is helpful.
    Wednesday, April 15, 2020 10:35 AM
  • Hi Charles,

    Since this forum focuses more on questions related to Office desktop applications, if you need further assistance on this problem, I'd like to help you move the thread to the following forum: Microsoft Graph Forum. You may get more helpful replies there.

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thanks for your kind understanding.

    Best Regards,

    Herb


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Office 2019.

    Thursday, April 16, 2020 1:56 AM