Forum Widgets
Latest Discussions
Abnormal FileRef for document library file
Hi, we found an abnormal api behavior when attempting to get file with sharepoint api When we use sharepoint api https://ferociagroep.sharepoint.com/sites/****************/_api/Web/Lists(@lid)/Items(@iid)?@lid=guid%27****************%27&@iid=****************&$select=FileRef to get file, we found the FileRef as below: /sites/*******************/_vti_rb/0/19386/Berekening Inlenersbeloning en salaris/Berekening salaris Rishi Djairam .docx However, the site root is supposed to be /sites/*******************/document, instead of the _vti_rb, does anyone what is _vti_rb? Thank you, Best regards, Ethan FangethanfangFeb 13, 2025Copper Contributor11Views0likes0CommentsSharepoint online vermeer packet calls failing against sharepoint online
I am troubleshooting a very old sharepoint integration program we have. We make calls against sharepoint to place documents in it. And we use a very old sharepoint api (Vermeer packets) This is using some very old code that was originally for on-prem sharepoint but which we have patched over the years to work with sharepoint online. We're finding that with one particular customer that we're getting 500 errors along with the text "Operation is not valid due to the current state of the object." when making calls like I'll show below the break. Now this all works in dozens of other customer installs (yes even sharepoint 365 ones). I'm wondering if there are any sharepoint settings anyone knows about that might cause issues like this. Some type of security hardening switch that may have been flipped to dissallow calls like this? It may very well be that MS doesn't allow calls like this anymore in newer environments but that the older ones are grandfathered in. I'd love to see some type of documentation about something like that, but have found none so far. Below is the call and response I'm getting --- We make the http call POST https://CUSTOMER.sharepoint.com/_vti_bin/shtml.dll/_vti_rpc HTTP/1.1 Content-Type: application/x-www-form-urlencoded X-Vermeer-Content-Type: application/x-www-form-urlencoded User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; windows NT; MS Search 6.0 Robot) Host: esrtcloud.sharepoint.com Content-Length: 46 Cache-Control: no-cache method=url+to+web+url:6.0.2.5420&url=/&flags=0 And Receive the response HTTP/1.1 500 Internal Server Error Content-Length: 62 P3P: CP="ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI" X-NetworkStatistics: 1,525568,0,3568,358383,0,228305,6 IsOCDI: 0 X-DataBoundary: NONE X-1DSCollectorUrl: https://mobile.events.data.microsoft.com/OneCollector/1.0/ X-AriaCollectorURL: https://browser.pipe.aria.microsoft.com/Collector/3.0/ SPRequestGuid: 96d380a1-00cc-8000-1d92-1db10c88e0c6 request-id: 96d380a1-00cc-8000-1d92-1db10c88e0c6 MS-CV: oYDTlswAAIAdkh2xDIjgxg.0 Alt-Svc: h3=":443";ma=86400 Report-To: {"group":"network-errors","max_age":7200,"endpoints":[{"url":"https://spo.nel.measure.office.net/api/report?tenantId=00000000-0000-0000-0000-000000000000&destinationEndpoint=Edge-Prod-EWR31r5b&frontEnd=AFD&RemoteIP=64.20.162.0"}]} NEL: {"report_to":"network-errors","max_age":7200,"success_fraction":0.001,"failure_fraction":1.0} Strict-Transport-Security: max-age=31536000 X-FRAME-OPTIONS: SAMEORIGIN Content-Security-Policy: frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com *.skype.com *.teams.microsoft.us local.teams.office.com teams.cloud.microsoft *.office365.com goals.cloud.microsoft *.powerapps.com *.powerbi.com *.yammer.com engage.cloud.microsoft word.cloud.microsoft excel.cloud.microsoft powerpoint.cloud.microsoft *.officeapps.live.com *.office.com *.microsoft365.com m365.cloud.microsoft *.cloud.microsoft *.stream.azure-test.net *.microsoftstream.com *.dynamics.com *.microsoft.com http://onedrive.live.com *.onedrive.live.com securebroker.sharepointonline.com; SPRequestDuration: 11 SPIisLatency: 1 X-Powered-By: http://ASP.NET MicrosoftSharePointTeamServices: 16.0.0.25722 X-Content-Type-Options: nosniff X-MS-InvokeApp: 1; RequireReadOnly X-Cache: CONFIG_NOCACHE X-MSEdge-Ref: Ref A: 203E3FC24FC84560B6FBE9F468E72B68 Ref B: EWR311000104035 Ref C: 2025-02-12T16:44:53Z Date: Wed, 12 Feb 2025 16:44:52 GMT Operation is not valid due to the current state of the object. For comparison, a successful response to the call looks like this HTTP/1.1 200 OK Server: Microsoft-IIS/10.0 Date: Wed, 12 Feb 2025 20:45:51 GMT Connection: close Content-type: text/html; charset=utf-8 <html><head><title>vermeer RPC packet</title></head> <body> <p>method=url to web url:6.0.2.5420 <p>webUrl=/ <p>fileUrl= </body> </html>grillod1Feb 12, 2025Copper Contributor11Views0likes0Comments401 unauthorised for ExecuteQuery in sharepoint CSOM
Hi, I am trying to connect the sharepoint site with client id and secret but getting 401 unauthroised error while hitting the executequery() method. While doing app registrations both Microsoft graph and share point API permissions with full site control has been given including trusted the app through appinv.aspx. Still getting 401 unauthorised error. Since ACS is retiring, do we need to follow any other permissions for share point level site access. The same execute query is working fine for client id, certificate combination. But not working for client id and secret. static void Main(string[] args) { var authManager = new AuthenticationManager("***************************", "C:\\Program Files\\OpenSSL-Win64\\bin\\certificate.pfx", "*******", "********.onmicrosoft.com"); using (var cc = authManager.GetContext("https://****.sharepoint.com/sites/****")) { cc.Load(cc.Web, p => p.Title); cc.ExecuteQuery(); Console.WriteLine(cc.Web.Title); ListCollection listCollection = cc.Web.Lists; cc.ExecuteQuery(); // this is working fine }; // Replace with your SharePoint Online details string siteUrl = "****************************"; string tenantId = "***************************"; string clientId = "********************************"; string clientSecret = "******************************"; // App secret try { using (var context = GetClientContextWithOAuth(siteUrl, tenantId, clientId, clientSecret)) { // Example: Retrieve web title Web web = context.Web; context.Load(web, w => w.Title); context.ExecuteQuery(); // this is throwing 401 unauthorized error Console.WriteLine("Connected to: " + web.Title); } } catch (Exception ex) { Console.WriteLine("Error: " + ex.Message); } } private static ClientContext GetClientContextWithOAuth(string siteUrl, string tenantId, string clientId, string clientSecret) { // Azure AD OAuth 2.0 endpoint string authority = $"https://login.microsoftonline.com/*******************"; // Use MSAL to acquire an access token var app = ConfidentialClientApplicationBuilder.Create(clientId) .WithClientSecret(clientSecret) .WithAuthority(new Uri(authority)) .Build(); var authResult = app.AcquireTokenForClient(new[] { $"{siteUrl}/.default" }).ExecuteAsync().Result; if (authResult == null) { throw new Exception("Failed to acquire the access token."); } // Use the access token to authenticate the ClientContext var context = new ClientContext(siteUrl); context.ExecutingWebRequest += (sender, e) => { e.WebRequestExecutor.WebRequest.Headers["Authorization"] = "Bearer " + authResult.AccessToken; }; return context; }dhanushaelangovanFeb 12, 2025Copper Contributor26Views0likes0CommentsManaged metadata showing up randomly in lists (might be PnP Provisioning related)
Dear people, I have SharePoint sites with a lot of lists each containing a couple of managed metadata columns. The sites are defined in a template and get rolled out via PnP provisioning. I did that many times before and never had this: The lists show a weird behavior: some items get randomly the value of a specific managed metadata (it's always the same). None of the columns have set a default value. All lists have only list content types - no site content types. The lists where the metadata shows up don't even have a column where this metadata is set. I was suspecting the -1 setting in the default value in the columns to connect to the Hidden Taxonomy List so I removed all default values. But the issue persists. Has anyone ever experienced this? Thank y'all!Maj-JacobJan 30, 2025Copper Contributor24Views0likes0CommentsIn SharePoint we have "Everyone except external users" AD Group but can't be synced by SCIM
We are using SharePoint online and SharePoint server 2016, 2019, subscription edition and we are seeing some issues and Azure AD. I have synced a customer's Azure AD using SCIM . Also synced SharePoint site in a SharePointCustomApp that we have using SharePoint APIs. Now for SharePoint we get pages with ACL for groups and one of the group's name is "Everyone except external users". All the pages have groups associated and they are federated from Azure AD and we found all groups. However "Everyone except external users" group cannot be synced via IDC SCIM protocol. Other groups we are able to sync properly(can get its members). Our other customers are also facing same issue for this "Everyone except external users" group. We need this group ("Everyone except external users") also to return proper members.yname2480Jan 27, 2025Copper Contributor16Views0likes0CommentsPrevent Automatically Opening the File Explorer on the Upload Tab (filepicker)
I am working on an application customizer that will inject custom UI into the File Picker's Upload tab. Because of this, I want to prevent the file explorer from automatically opening when the user clicks on the Upload tab. I’ve tried several methods to achieve this by manipulating the DOM through my custom code in the application customizer. I even tried removing the "file" input element from my custom code. However, the file explorer still opens automatically when the user clicks on the Upload tab. Is there any way to prevent this?addindeveloper1Jan 21, 2025Copper Contributor9Views0likes0CommentsMicrosoft Graph Search API Not Searching Image Titles
Dear, I am using the Microsoft Graph Search API (https://graph.microsoft.com/beta/search/query) to search files based on their names and content. While the API performs well for most file types, I have noticed that it does not return image files (e.g., PNG, JPG) when the search term matches the title of the image. Here are the key observations: Expected Behavior: When a search term matches the title of an image file, the image should appear in the search results, just as other file types like documents and spreadsheets do. Current Behavior: Image files with titles matching the search term are not being returned in the search results. However, these files are retrievable using their metadata or direct path, suggesting they exist in the index. Additional Notes: Non-image files with matching titles are successfully retrieved. This behavior persists even when explicitly specifying the entityTypes as driveItem. Questions: Is there a limitation in the Microsoft Graph Search API that prevents searching for image files based on their titles? If this is not a limitation, could you provide guidance on how to structure the query to include image files based on their titles? Are there specific configurations or indexing processes required to enable title-based searches for image files? This functionality is critical for our use case, as we need to perform consistent and comprehensive searches across all file types, including images. Your assistance in resolving this issue or providing clarification would be greatly appreciated.HardikAuzmorJan 20, 2025Copper Contributor10Views0likes0CommentsCustom Context button not working in site page (Library as webpart)
I'm facing the issue. Created ListviewCommandset Extension for context menu is working fine on library level and able to see my custom button but when i add the document library as webpart in the site page , I'm not able to get the custom context menu. I have used SP version of 1.19 also 1.20 and 1.16 also. Tried with CSOM code also SP.ClientContext for context. Also tried this.context.listView.SelectedRows. All this are working fine on Document library level not as webpart in site page. Please give any solution to achieve this . Thanks in advanceHariharan2468Jan 17, 2025Copper Contributor6Views0likes0CommentsHow to add buttons in context menu in a Doc Library which is added as a WebPart inside a SP page
Hi, I created list view command set extension application for adding a custom button into the context menu. I have a SharePoint Page in which I added a document library as a webpart. In the Serve.Json of my application I have given this page URL to apply the custom button into the library. Around 2 weeks back this approach worked and the buttons were shown in the context menu but now they are not showing. In a normal document library it is working and showing the Custom button. but in a page where a document library is added as a web part it is not showing. How can we achieve this? What could be the Reason? And Please give me any solution to achieve this functionality. Note: I have tried this solution with different SharePoint Sites but it didn't worked. Thanks in AdvanceShivaram1436Jan 17, 2025Copper Contributor18Views0likes0CommentsHow to read file content for a IRM Protected PDF?
I have a SharePoint Document Library with IRM Protection turned on. I need to read content of the IRM Protected PDF file at the code level (.NET API Endpoint). I am able to get the binary content of the file at the code level, but no PDF Reader is able to read the content of the IRM Protected file. Is there a work around?SiddheshDambeDec 31, 2024Copper Contributor4Views0likes0Comments
Resources
Tags
- developer1,225 Topics
- PnP644 Topics
- apis480 Topics
- Extensibility250 Topics
- Responsive127 Topics
- sharepoint111 Topics
- hybrid81 Topics
- SPFx70 Topics
- SharePoint Online64 Topics
- powershell23 Topics