Developer Support
30 TopicsFixing issue in making cross domain Ajax call to SharePoint REST service in Chrome
First published on TECHNET on Jun 10, 2017 This post is a contribution from Jing Wang, an engineer with the SharePoint Developer Support teamSymptom:Remote Ajax Application is configured with Windows Authentication.29KViews0likes10CommentsSharePoint Online Authentication in Powershell for CSOM when Legacy Authentication is disabled for tenant or Multi Factor Authentication is enabled for user
First published on TECHNET on Oct 27, 2018 This post is a contribution from Sohail Sayed, an engineer with the SharePoint Developer Support teamSharePoint Online Authentication in Powershell for CSOM when Legacy Authentication is disabled for tenant or Multi Factor Authentication is enabled for userAuthentication using SharePointOnlineCredentials class will work only if Legacy auth is enabled.24KViews1like1CommentHow to retrieve analytics information for Pages in the "Site Pages"? using Graph Get itemAnalytics?
Making calls with just analytics endpoint/sites/{site-id}/lists/{list-id}/items/{item-id}/analytics will return null data as shown below: {'@odata.context': 'https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.itemAnalytics', 'allTime': None, 'lastSevenDays': None} Please make calls and request 'alltime' and 'lastsevendays' separately as shown below: /sites/{site-id}/lists/{list-id}/items/{item-id}/analytics/alltime /sites/{site-id}/lists/{list-id}/items/{item-id}/analytics/lastsevendays Step 1: Retrieve all the internal SharePoint ids of the all Pagesin the "Site Pages" https://graph.microsoft.com/v1.0/sites('spotenant.sharepoint.com,df6ba610-0000-0000-0000-ba2733d0182e,e0dbcdc6-0637-0000-0000-49aaa1ce4d37')/lists('190b9516-0000-0000-0000-90fe7360d416')/items?select=sharepointids Note:'190b9516-0000-0000-0000-90fe7360d416'This is the actual list GUID of your "Site Pages" library. Sample Output: { "@odata.etag": "\"6967cfed-0000-0000-0000-b480c1764375,3\"", "sharepointIds": { "listId": "190b9516-0000-0000-0000-90fe7360d416", "listItemId": "1", "listItemUniqueId": "6967cfed-0000-0000-0000-b480c1764375", "siteId": "df6ba610-0000-0000-0000-ba2733d0182e", "siteUrl": "https://spotenant.sharepoint.com/sites/TestSite105", "tenantId": "d6f932a7-0000-00000-0000-b27004970776", "webId": "e0dbcdc6-0000-0000-0000-49aaa1ce4d37" } }, Step 2: Select any Pages"listItemUniqueId" retrievedin Step 1 and make following call: Note: You need to make sure the site you are requesting has the"Sharepoint Viewers"feature enabled:https://support.microsoft.com/en-us/office/allow-people-to-see-who-views-their-files-or-pages-ee26dde0-c30e-4eca-b1c3-38922c450967. This is required to give you expanded actors or users information. Please see sample out put below: https://graph.microsoft.com/v1.0/sites('spotenant.sharepoint.com,df6ba610-0000-0000-0000-ba2733d0182e,e0dbcdc6-0637-0000-0000-49aaa1ce4d37')/lists('190b9516-0000-0000-0000-90fe7360d416')/items('6967cfed-0000-0000-0000-b480c1764375')/analytics/alltime?$expand=activities Data returned below: { "@odata.context":"https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.itemActivityStat", "aggregationInterval":"None", "startDateTime":"0001-01-01T00:00:00Z", "endDateTime":"0001-01-01T00:00:00Z", "isTrending":false, "access": { "actionCount":345, "actorCount":6, "timeSpentInSeconds":0 }, "incompleteData": { "missingDataBeforeDateTime":"2018-09-21T19:20:43Z", "wasThrottled":false, "resultsPending":false, "notSupported":false }, "activities": [ { "id":"00000", "activityDateTime":"2021-04-12T17:59:12Z", "location": { "address": { "city":"", "countryOrRegion":"", "postalCode":"", "state":"", "street":"" } }, "access": {}, "actor": { "user": { "displayName":"Admin SPOTenant", "email":"admin@spotenant.onmicrosoft.com", "id":"faaa2e55-0000-0000-0000-c774a83bbbde", "userType":"Internal" } } }, { "id":"00001", "activityDateTime":"2020-12-12T01:03:30Z", "location": { "address": { "city":"", "countryOrRegion":"", "postalCode":"", "state":"", "street":"" } }, "access": {}, "actor": { "user": { "displayName":"Alex Darrow", "email":"alexd@spotenant.onmicrosoft.com", "id":"e81cac19-0000-0000-0000-4c938b101a33", "userType":"Internal" } } } ] }14KViews3likes4CommentsOneDrive usage reports return GUIDs or pseudonymized values instead of actual data values.
OneDrive usage reports and Graph API endpoints /reports/getOneDriveUsageAccountDetail started returning GUIDs for ownerDisplayName, ownerPrincipalName, and siteURL instead of the actual data values that had previously been returned.This is an expected behavior, which was implemented starting Sep 1st, 2021.8.9KViews2likes0Comments