Graph API
6 TopicsSPFx webparts not able to acquire token for Graph API in Teams app (Viva Connections)
Hi all, There is a very strange thing happening to a few webparts that we've build for one of our clients. We haven't seen this problem in other tenants, it seems to be related to this specific tenant. Maybe it's a setting, or maybe it's a bug. Hopefully someone can help us. This is the case: We have created a SharePoint intranet site and made it the root site. We then added the site to the Viva Connections integration in Teams, as an app. On this site we have a couple of custom webparts that we created. One of the webparts have been used in many intranet sites and haven't had these problems so far. The problem also isn't occurring on SharePoint itself. The problem is connecting to the Graph API, the token doesn't seem to be retrieved and thus the API requests are not even send to the Graph API. Environment details: Microsoft Egde version 115.0.1901.183 (Official build) (64-bit) SPFx 1.17.4 Node 16.15.1 NPM 8.11.0 The error I'm getting: Uncaught (in promise) Error: Token request previously failed at new t (chunk.aadTokenProvider_en-us_445a72773ba77a61be93.js:1:1514) at e._getTokenInternal (chunk.aadTokenProvider_en-us_445a72773ba77a61be93.js:1:3567) at e.getToken (chunk.aadTokenProvider_en-us_445a72773ba77a61be93.js:1:2372) at sp-pages-assembly_en-us_c3c628b67d521769ee27f473c0ed9543.js:76:647657 The request that might be the problem: https://tenant.sharepoint.com/_api/Microsoft.SharePoint.Internal.ClientSideComponent.Token.AcquireOBOToken?resource=%27https://graph.microsoft.com%27&clientId=%2775aff87b-45bf-41e7-84f3-552901a72ea0%27 Results in an 500 internal server error with the following message: { "odata.error": { "code": "-1, System.AggregateException", "message": { "lang": "en-US", "value": "One or more errors occurred." } } } I found this issue https://github.com/SharePoint/sp-dev-docs/issues/7884 which seems to be related to mine or at least gives the same error, but the resolution there doesn't apply here sadly. The manifest is already in the right format and with the correct data. Also cross referenced the manifest with other, working tenants At this point I have no clue on what the cause of the issue is, could any of you help me with this problem? Kind regards, ArjenSolved4.7KViews0likes4CommentsGraph created OneNote not recognized as "Site-Notebook"
When creating a new Office365 Group, the "Site Notebook" is not provisioned until the Notebook link is clicked in the left navigation of the associated SharePoint site. I'm trying to automate this process by creating the Notebook through the GraphAPI (/groups/{id}/onenote/notebooks) - which works fine. However, the newly created notebook is not coupled to the navigation link in the left menu of the SharePoint site. This results in a second notebook being created when clicking the link. Is there a way to indicate that the notebook I created should be used as the Site Notebook? PS: I also noticed that Notebooks are created in Shared Documents library, and the "default" one in SiteAssets.914Views0likes1CommentHow to use SharePoint search query with SharePoint Granular access permissions?
I want to execute SharePoint search API with granular access for that I've changed 'Sites.ReadWrite.All' permission to 'Sites.Selected' permission, so that application would have all sites access but during search I'm getting unauthorize error ``` {"odata.error":{"code":"-1, Microsoft.Office.Server.Search.REST.SearchServiceException","message":{"lang":"en-US","value":"Unauthorized."}}} ``` Also tried to give sites.selected permission at tenant level, that also not works, if the only solution is to give 'Sites.ReadWrite.All' or 'Sites.Read' then there is no use of granular level access implementation Sites.Read.all will allow all sites if granted. My query is similar to below -: https://tenant.sharepoint.com/_api/search/query?querytext='*+AND+(Path:"https://tenant.sharepoint.com/sites/SITE1/RECORDS" OR Path:"https://tenant.sharepoint.com/sites/SITE2/RECORDS")'&trimDuplicates=false&selectProperties='Column1,Column2'&refiners='Column1OWSTEXT'&refinementFilters='Column1:equals(\"xxxxx\")'&rowLimit=5 Some other references regarding my question. https://sharepoint.stackexchange.com/questions/306397/how-to-use-sharepoint-search-query-with-sharepoint-granular-access-permissions?newreg=dbcbb62ae019481c9a864f537ecd0faf https://sharepoint.stackexchange.com/questions/306432/is-that-sites-selected-permissions-level-allows-the-sharepoint-online-global Really appreciate any response on this or alternative approach to to achieve this.794Views0likes0CommentsUnable to get notebooks of a sharepoint site
I am trying to execute the following graph API request against one of our customer's sharepoint site. GET https://office365.us.vadesecure.com/safeproxy/v3?f=9mF87uEhaQ-gvaWHI8O3gogEXHoDEduYq2nmjlS1ZLGTOBJaiEyoEgINv7zjnlLu&i=5RLNnxC-Lq226sYznzp1Hp8-4RS64iQvzZBTdbXrwO1Ps9rm_4vDLqECithhcyAuEb-8eUlK-_beeKgzyoEtgA&k=gKjE&r=cm4NK-wWipDxnyh-uD3CCztS9nsCDiDzaseW_9K8bM_O-zU4JXgj9tHy6K6gOh9K&u=https%3A%2F%2Ftracking.cirrusinsight.com%2F5c9e9cdc-4047-406c-9a55-96a184081614%2Foffice365-us-vadesecure-com-safeproxy-v38 But ending up with the below response. { "error": { "code": "10013", "message": "One or more of the document libraries on the user or group’s OneDrive contains more than 20,000 items and cannot be indexed for querying using the API. Browse to this page for more information: https://office365.us.vadesecure.com/safeproxy/v3?f=HQV0yaT_IRk54S9YKtelRWoHr1JMB-aV-6SSuQGkTIKSSgKITd4WRUx2dPXyIdxq&i=5pj-00XsG9AYtr-2QlHDoHsno7SnzZUWkrpTL73mcsfe3vOUiBl8Ct_lDr3yKD4YZht2Hl3TfWky4cIGb6qTCw&k=j9Xn&r=RscOKuvtSE83ujlQr_do4UBQS4W25QswDVZBjNgTzIk7_hY4_5A_2ualOZ_XcjpW&u=https%3A%2F%2Ftracking.cirrusinsight.com%2F5c9e9cdc-4047-406c-9a55-96a184081614%2Foffice365-us-vadesecure-com-safeproxy-v37", "innerError": { "request-id": "f22a0847-ecf3-4ae6-886d-e8826c0bf8c2", "date": "2019-07-30T04:57:17" } } } Based on the link provided we have reached the customer with the workaround but they said they don't have such a number of items under their sharepoint site. The attached screenshot is provided by the customer.744Views0likes0CommentsCustom solution with the MigrationTool DLLs
Had anyone have success writing custom VS solution using the DLLs in C:\Users\{username}\Documents\WindowsPowerShell\Modules\Microsoft.SharePoint.MigrationTool.PowerShell It looks like the tool is using CSOM. I am interested in the ability to copy files preserving the "Created By" from SP2013 to SPO. Any idea? Thx732Views0likes0CommentsForward Files when uploaded from Teams to another server
Hi Fellow developers, I have a project requirement wherein whenever a file is being sent in the team channels of my organization, I want them to be immediately sent to another server for sanity scanning. Can this be achieved from SPFx for multiple lists as each channel will have its own list? I have already looked into the documentation and the best I could think of was having a provider-hosted add-in which will have Graph API's change notification subscription for all the lists associated with all the channels in the teams of my organization. However, it seems to me a not-so optimal approach. Is there a better way of achieving this which I could not figure out from the Sharepoint, Teams and Graph API Documentations? Please let me know, it will be a great help. Thank you!664Views0likes0Comments