You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to get the default associated groups for a web incorrectly creates a getbyid URL, which then contains an unresolved token for the ID.
This affects AssociatedOwnerGroup, AssociatedMemberGroup, and AssociatedVisitorGroup.
PnP.Core: Unresolved tokens found in API call
https://<tenant>.sharepoint.com/sites/test/_api/Web/sitegroups/getbyid({Id})
Steps to reproduce
Run code snippet below
Experience error
varcontext=await_contextFactory.CreateAsync(newUri("https://<tenant>.sharepoint.com/sites/test"));// using `context.Web` directly and omitting this makes no difference.varweb=awaitcontext.Web.GetAsync();varmembers=awaitweb.AssociatedVisitorGroup.GetAsync();
Expected behavior
The generated URL correctly points to the associated group, and the data is fetched without error.
varweb=awaitcontext.Web.GetAsync(p =>p.AssociatedVisitorGroup.QueryProperties(p=>p.Users), p =>p.AssociatedMemberGroup.QueryProperties(p =>p.Users));foreach(varuserinweb.AssociatedMemberGroup.Users.AsRequested()){}
I appreciate the workaround, but I disagree that the issue should be closed, since getting the properties directly (as in my repro) still causes an error. I'd argue if this is 'intended', at the very least this should be documented.
Category
Describe the bug
Attempting to get the default associated groups for a web incorrectly creates a
getbyid
URL, which then contains an unresolved token for the ID.This affects
AssociatedOwnerGroup
,AssociatedMemberGroup
, andAssociatedVisitorGroup
.Steps to reproduce
Expected behavior
The generated URL correctly points to the associated group, and the data is fetched without error.
eg:
Environment details (development & target environment)
The text was updated successfully, but these errors were encountered: