sharepoint online
18337 TopicsHow to extract full SharePoint Site Usage Analytics via API (avg time, device, heatmap)?
Hello everyone, I'm trying to automate the extraction of SharePoint Site Usage Analytics reports, but I'm running into a limitation where the data exposed by Microsoft Graph API does not match the analytics available in the SharePoint UI or the exported Excel report. In the SharePoint site analytics page, I can see metrics such as: Unique viewers Site visits Average time spent per user Usage by device Usage by time (heatmap) Trend charts for the selected period (7 / 30 / 90 days) There is also a Download button that exports an Excel file containing all these analytics. However, when I query Microsoft Graph using the SharePoint usage reports endpoints (for example: getSharePointSiteUsageDetail), the API only returns a subset of the data: { "lastActivityDate": "2026-01-20", "uniqueViewers": "28", "siteVisits": "615", "avgTimeSpentPerUser": null, "byDevice": null, "byTimeHeatmap": null, "fileCount": "759", "activeFileCount": "45", "pageViewCount": "615", "visitedPageCount": "28", "reportRefreshDate": "2026-01-20", "reportPeriodDays": "7" } As you can see: Fields like avgTimeSpentPerUser, byDevice, and byTimeHeatmap are always returned as null. The numeric values (unique viewers, visits, etc.) are also different from what the SharePoint UI shows for the same time range. The Graph data appears to be delayed and aggregated differently compared to the UI. From what I can tell: These metrics seem to exist internally (since the UI and Excel export clearly show them). But they are not exposed through any documented Graph API endpoint. The Excel download does not appear to have a stable or supported API endpoint that can be called programmatically. My questions Is there any supported way to programmatically retrieve the full SharePoint analytics dataset (including avg time, device breakdown and time heatmap)? Is the Excel export endpoint accessible via any supported API? Are these fields intentionally not exposed in Microsoft Graph? If this is not possible today, what is the recommended approach for automating this type of analytics collection? Any clarification or official guidance would be greatly appreciated. Thanks in advance!6Views0likes0CommentsUser Accounts Not Populating with Filters in Directory with PnP V4
I'm working on building a staff directory for my org. I'm leveraging the PnP Modern Search Web Parts for this directory. I am having issues with 5 user accounts not populating in the Search Results Web Part with the department or office filters applied to the SearchTerms box. I have RefinableString03 set to People:Department and People:SPS-DEPARTMENT. RefinableString09 is set to People:OFFICE and People:SPS-Location. If I set the SearchTerms box to *, the 5 missing user accounts populate along with other accounts that needed filtered out. The location/office and department attributes are set for each of these accounts. They show in the hovercard for each account. It seems that the department and office/location attributes are not being picked up by the SearchTerm filter when the RefinableString03 and or RefinableString09 are applied to the Search Results Web Part. User account attributes are synced from our on-prem AD environment. What piece am I missing here?10Views0likes0CommentsIntermittent failures when creating new libraries in modern SharePoint
Hi everyone, I’m seeing an issue in our modern SharePoint Online site collection where creating new document libraries has started failing. This site has worked normally for years, but over the past week, most library creation attempts haven't worked. 1) The page briefly flashes or glitches during the creation process. and 2) A non‑ending spinning wheel when I hit "create" or 3) Creation attempts return “Something's not right.” error page. The failures happen across all subsites, in multiple browsers, and I’m a Site Collection Administrator. No permission changes were made recently. Has anyone seen similar intermittent library creation failures in a modern site collection, or know what might cause this kind of inconsistent behavior? Any guidance would be appreciated. Thanks! Meagan41Views0likes3CommentsHoe kun je een Excel Werkmap in SharePoint delen en bepaalde informatie verbergen?
Bij een klant van mij wordt in SharePoint door twee personen gewerkt met een gedeelde Excel werkmap. Beide gebruikers kunnen gelijktijdig muteren en ze zien in real time welke aanpassing de collega maakt. Tot zover geen probleem. Nu willen ze de werkmap ook delen met personen buiten hun organisatie. Deze mogen niet muteren, maar ze mogen ook niet alle regels van de werkmap zien. Hoe kan ik dat regelen in SharePoint?10Views0likes0CommentsPNP Search Results sort by title
Hi. I have a PNP Search results webpart, that brings me all the Document Libraries in SharePoint site (that are not the standard ones Like site assets, pages etc) I want the results to be sorted, but i tried with sort column and it does not work, I want it to show in alphabetical order If i use "edit sort order" and select by title, it gives me an error I added a RefinableString where i have the title but it is still not sorting it How can i get this list sorted without having to add another column for the Title (with out the link) THank you78Views0likes1CommentTo hide the file preview section in a SharePoint Document library gallery card with JSON
Hello All, I have a SharePoint document library and I created a gallery view for it. I displayed several columns/metadata on the gallery view. I want to disable/hide the file preview section in this card. I believe this can easily be done by changing some code in JSON at the Format view Advanced. However, I don't know how to do it. I hope there is someone, in this form, could be able to help me. Thanks in advanced.46Views1like1CommentPage Redirection
Hello, I am trying to simulate a migration scenario in SharePoint Online and am running into a limitation I cannot resolve. For demo/testing purposes, I have two SharePoint Online sites (e.g. Old and New). I would like to redirect a small number of individual pages from the old site to corresponding pages in the new site, while the rest of the old site remains unchanged. Example: Redirect https://ps3c.sharepoint.com/sites/Old/SitePages/Test.aspx to https://ps3c.sharepoint.com/sites/New/SitePages/Test.aspx The page is a modern SharePoint page, and the URL itself is fixed for the purpose of the demo (i.e. users or tools open the page directly on *.sharepoint.com). All documentation I could find only describes redirecting entire SharePoint sites, not individual modern pages. Client-side approaches (JavaScript, HTML meta refresh, etc.) also appear to be blocked in modern SharePoint. Is there any supported or recommended way in SharePoint Online to implement page-level redirects for modern pages, or is this currently not supported by design? Kind regards10Views0likes0CommentsChange in SharePoint File Selection Behaviour
Has anyone noticed this in the last week/s? Basically before, you used to be able to SELECT files without opening them. Now, 5-6 times out of ten, if I try to select a document or folder it opens instead. Like, even when i am clearly clicking the checkmark to the left of the file/folder, it will STILL OPEN in the browser, rather than just selecting. It's like the file open behaviour has gotten more sensitive or something? It's really frustrating because my users need to add metadata to documents by selecting them, and now they have to fight with SharePoint nearly every time.65Views1like1CommentExport list of users with unique permissions
Hello community, The context: We have a document library with 30 000 items. We broke inheritance and set up special permissions for some of them. Now we have about 30 items with special permissions that can be listed in Sharepoint Online. See the picture below. What we want: We want to get list of user on each item now. How can we do that? The output should look like this item1 - user 1 item1 - user 2 item1 - user 3 item1 - group 1 item1 - group 2 item 2 - user 1 item 2 - user 5 ... The idea We will write powershell script But can we identify items with special permissions the same way Sharepoint does it in the picture? How? How to use the API correctly because we cannot list each item (30k) in Sharepoint for performace reasons right? Related topics maybe? List of Unique Permissions from Site Settings | Microsoft Community Hub mentioning StephenRice63Views0likes1CommentPromotedState does not update anymore
I wish to update the promoted status to 0 (page), 1 (unpublished news) or 3 (published news). I was always doing this via SharePoints column formatting. See .json column formatting below. This worked perfectly fine until about this week. Now it doesn't seem to work anymore. Now I tried updating the PromotedState also via PowerAutomate. This also doesn't seem to work... How should I now change the PromotedState. Does someone have any clue how I can update the PromotedState or why the column formatting way of wokring, suddently doesn't work anymore? The json code for column formatting. { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "style": { "flex-wrap": "nowrap", "display": "flex", "flex-direction": "row" }, "children": [ { "elmType": "div", "txtContent": "=if(@currentField == 0 ,'0 : Page' , if(@currentField == 1, '1 : News (Unpublished)' , if(@currentField == 2 , '2 : News','') ) )", "style": { "box-sizing": "border-box", "padding": "4px 8px 5px 8px", "display": "flex", "border-radius": "16px", "align-items": "center", "overflow": "hidden", "margin": "4px 4px 4px 4px", "border": "1px solid" }, "attributes": { "class": "=if(@currentField == 0 ,'ms-fontColor-themePrimary ms-borderColor-themePrimary ms-bgColor-white' , if(@currentField == 1, 'ms-fontColor-themePrimary ms-borderColor-themePrimary ms-bgColor-themeLighter' , if(@currentField == 2 , 'ms-fontColor-white ms-borderColor-themePrimary ms-bgColor-themePrimary','') ) )" } }, { "elmType": "div", "style": { "font-size": "18px", "cursor": "pointer", "padding": "10px", "border-radius": "50%" }, "attributes": { "iconName": "MoreVertical", "class": "ms-fontColor-themePrimary ms-bgColor-themeLighter--hover" }, "customCardProps": { "openOnEvent": "click", "directionalHint": "rightCenter", "isBeakVisible": true, "formatter": { "elmType": "div", "style": { "display": "flex", "flex-direction": "column", "align-items": "flex-start" }, "children": [ { "elmType": "div", "txtContent": "Change to Page (0)", "style": { "padding": "10px 20px 10px 20px", "cursor": "pointer", "width": "200px" }, "attributes": { "class": "ms-bgColor-themeLighter--hover" }, "customRowAction": { "action": "setValue", "actionInput": { "PromotedState": "0" } } }, { "elmType": "div", "txtContent": "Change to unpublished news (1)", "style": { "padding": "10px 20px 10px 20px", "cursor": "pointer", "width": "200px" }, "attributes": { "class": "ms-bgColor-themeLighter--hover" }, "customRowAction": { "action": "setValue", "actionInput": { "PromotedState": "1" } } }, { "elmType": "div", "txtContent": "Change to published news (2)", "style": { "padding": "10px 20px 10px 20px", "cursor": "pointer", "width": "200px" }, "attributes": { "class": "ms-bgColor-themeLighter--hover" }, "customRowAction": { "action": "setValue", "actionInput": { "PromotedState": "2" } } } ] } } } ] } The HTTP SharePoint call to update the PromotedStatus.23Views0likes1Comment