Open jimmywim opened 1 year ago
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Is this something you could achieve with the Search API instead (something I've done in the past for this same reason)? We can use the internal managed properties isHubSite and departmentId to determine a hubsite and related sites... or are you stuck wanting to use the hubsite REST API instead?
The text
Gets information about all hub sites that the current user can access.
is inaccurate based on the existing behaviour, specifically the phrasethe current user can access
.The existing behaviour appears to be that the hub sites that are returned are the hub sites where the
People who can associate sites with this hub
is either blank, or the current user is listed in there (this relates to theTargets
property on a particular Hub).Either this documentation needs to be updated to reflect this fact if this is indeed the intended behaviour, or a bug raised against the API if this is not the intended behaviour.
I would prefer if any user can see all hub sites with this API (or sites they have at least Read access to), and other APIs for Hub Sites (e.g. Join Hub Site) actively prevent the user from joining if they are not listed in the
Targets
property for the hub.I currently use this API to retrieve hub site data for the tenant and use a custom SPFX extension to render a custom hierarchical navigation component, and presently I have to instruct users to not use the
People who can associate sites with this hub
feature in the admin centre, otherwise, users not listed here cannot retrieve information about the hub and it won't render.Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.