Forum Widgets
Latest Discussions
Sharepoint automatically adds a trailing zero to a currency in a sharepoint list
Hi there, Furthur to earlier thread https://answers.microsoft.com/en-us/msoffice/forum/all/sharepoint-automatically-adds-a-trailing-zero-to-a/4e41e967-3268-4853-8805-19b682992794?page=1 I am from India and still facing same issue. I have tried all the workarounds provided in above thread but none worked. In my case the column is a calculated column with nested IF formula. A single IF statement takes only 19 conditions until than it calculates value also correctly. But anything above 19 conditions it throws a generic value as Zero with out syntax error. If I add the & operator it calculates the value but adds additional zeros before and after the numbers. Requesting help at the earliest as my project is stuck Regards, AvinashNash007Mar 06, 2025Copper Contributor8Views0likes0CommentsWebhooks for file permissions changes
Hey there! I am looking to receive a webhook from Sharepoint when permissions on a file or folder change. This doesn't seem like an explicit event in Sharepoint, but I did find this section in the docs: I've tested using this header a few times, but so far have not been able to receive the webhooks. Here is a cURL of my webhook setup request: curl --location 'https://graph.microsoft.com/v1.0/subscriptions' \ --header 'Authorization: Bearer [redacted]' \ --header 'Content-Type: application/json' \ --header 'prefer: includesecuritywebhooks' \ --data '{ "resource": "/drives/[drive_id]/root", "changeType": "updated", "notificationUrl": "[target_url\]", "expirationDateTime": "2025-03-03T21:15:14Z", }' Sharepoint responds with a 201, with the following response headers: "headers": { "User-Agent": "Mozilla/5.0", "Accept-Encoding": "gzip, deflate, br", "Accept": "*/*", "Connection": "keep-alive", "Authorization": "[redacted]", "content-type": "application/json", "prefer": "includesecuritywebhooks", "Content-Length": "405" } So it does seem that the header was accepted. In terms of licenses, my Sharepoint instance is tied to a user with an E5 trial license, and a paid E3 license. I am still not receiving webhooks when permissions update on files. I do receive other webhooks (ie files changed, added etc), just not for a permission change event. Has anyone figured out how to use this header successfully? Thanks!mgongAPIMar 03, 2025Copper Contributor46Views0likes0CommentsAbnormal 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 Contributor15Views0likes0Comments401 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 Contributor39Views0likes0CommentsManaged 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 Contributor28Views0likes0CommentsIn 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 Contributor20Views0likes0CommentsPrevent 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 Contributor14Views0likes0CommentsCustom 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 Contributor8Views0likes0CommentsHow 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 Contributor21Views0likes0Comments
Resources
Tags
- developer1,226 Topics
- PnP645 Topics
- apis481 Topics
- Extensibility251 Topics
- Responsive128 Topics
- sharepoint111 Topics
- hybrid81 Topics
- SPFx70 Topics
- SharePoint Online64 Topics
- powershell23 Topics