Skip to content

Different output in graph and sharePoint version 2 API #5861

@mridul111998

Description

@mridul111998

I am using this graph API "https://graph.microsoft.com/v1.0/sites" in order to fetch all the sites but when I am using SharePoint API "https://{tenant-name}.sharepoint.com/_api/v2.0/sites" I am getting empty array in value

    "@odata.context": "https://abc.sharepoint.com/_api/v2.0/$metadata#sites",
    "value": []
}

I am not sure what is the issue. Do I need to fetch token in a different way for SharePoint version 2 API?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:csom/rest/apiCategory: SharePoint Client Side Object Model SDK / REST APIarea:docs-commentCategory: Comment left on bottom of a docs page here: https://docs.microsoft.com/sharepoint/devtype:archive-old-issueIssues which are closed as tool old for active worktype:questionQuestion... if answered, will be tagged as such.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions