Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delta request for sites doesn't return the correct ID of the site, only a subset #1487

Open
Marian-Kechlibar opened this issue Mar 22, 2024 · 1 comment
Labels
question Customer is asking for a clarification, use case or an information. Use it for Issues of type Questi

Comments

@Marian-Kechlibar
Copy link

I am using the latest version (2.3.0), and I want to get the list of all sites.

When I use the classical SitesRequestBuilderGetRequestConfiguration and invoke

$response = $context->sites()->get($configuration)->wait();

I get the correct set of values - instances of \Microsoft\Graph\Generated\Models\Site where ids of all the listed sites conform to the full specification of "Site collection hostname, Site collection unique ID, Site unique ID".

When I use DeltaRequestBuilderGetRequestConfiguration and invoke

$context->sites()->delta()->get()->wait()

all the instances of \Microsoft\Graph\Generated\Models\Site look identical, with the exception of the id field, which is suddenly truncated to the Site unique ID only. (Which isn't really unique globally, only within a certain site collection.)

The official documentation is a bit unclear on this. The example for obtaining the whole set clearly indicates that full ids should be returned:

"id": "contoso.sharepoint.com,da60e844-ba1d-49bc-b4d4-d5e36bae9019,712a596e-90a1-49e3-9b48-bfa80bee8740",

but the "Removed" response only indicates the Site unique ID only.

"id": "bd565af7-7963-4658-9a77-26e11ac73186",

Without consistent behavior, the delta requests will be unusable.

@SilasKenneth SilasKenneth added the question Customer is asking for a clarification, use case or an information. Use it for Issues of type Questi label Apr 3, 2024
@Admiral-Skye
Copy link

I am seeing the same issue with delta queries in C#. The returned id matches the web id of the sharepoint site.

I was able to work around this by requesting the siteCollection and sharepointIds properties and assembling the sharepoint graph Id from the siteCollection.hostName, sharepointIds.SiteId and sharepointIds.WebId

Ideally the graph delta response should just have the graph site id in the delta response as the Id of the value, the webId is functionally useless for retrieving any further information about the site from the Graph API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Customer is asking for a clarification, use case or an information. Use it for Issues of type Questi
Projects
None yet
Development

No branches or pull requests

3 participants