spfx webpart
7 TopicsSpFx Helloworld webpart does not show up under modern Page toolbox
Expected or Desired Behavior Upon installation of the app, i can add the webpart to the pages as well Observed Behavior After adding app ,i try to add the app to my page, the app is not showing up in the list of the available apps. Steps to reproduce Follow the steps mention in https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part and created simple helloworld web part Add the .sppkg file in appcatalog and add the app in site Expected behavior After adding app in site, I should able to add the web part on page. Environment details I have two tenants, on test tenant I don't face any issue it is working perfectly fine. But on Production tenant I am facing this issue Your Developer Environment: - Windows 10 Target Environment: SharePoint Online Framework: Node.js v10 Browser(s): Chrome v79 Tooling: VS Code Additional context I am trying to add Modern Script Editor web part from https://medium.com/niftit-sharepoint-blog/add-the-script-editor-webpart-back-to-sharepoint-modern-experience-688a7b7208e4blog but I cant add it on production as I can not see it in web part list after deployment,so I am trying to deploy the simple Helloworld WebPart but I cannot see it as well in web part list on Production Tenant. On Test tenant everything is working fine. Note : I have admin account with admin access. In Past I have deployed SPFX Extension and it worked very well Thanks for your contribution! Sharing is caring.17KViews0likes5CommentsHow to get Sharepoint online folder default properties using pnpjs library
Hello, Please I am trying to get the default folder properties from sharepoint document library. Attached are some of the properties that i could get but there are other properties I would like to retrieve, i.e. The image thumbnail, FileRef, FSObjType, FileLeafRef, ServerRelativeUrl, Folder.. etc. Below is my code:2.6KViews0likes1CommentWebsite Analytics For Modern SharePoint Site
I am trying to create a simple webpart that can be added to the bottom of a page and will insert the HTML <script> tag to add analytics to a page. I don't want to implement it across the entire tenant or even across all pages of a site. I want to control which specific pages are tracked. I created a simple SPFX webpart that inserts the <script> tag into the page. When I check the page source code, the <script> tag is there but it doesn't seem to be firing. The analytics platform isn't showing results and it isn't registering that the JS has been run. I verified with the SP admin that users are allowed to run custom scripts on self-service sites. Any ideas why this is happening?2.1KViews0likes5CommentsMicrosot Graph API get all users by managers name
Hi all, We are developing a people search webpart for an organisation with 1000's of users. One request we had was to add a text input that would filter the users by a managers name. I am new to Microsoft graph and struggling to come up with anything that will bring back these results. The only way I can see how to do it is to do the following: Get all the users when the webpart is initially rendered by doing multiple calls to the graph api users endpoint. Multiple calls are needed to get the users in batches (due to the top limit of 999 results in one call). Iterate over these results and get the manager of each user. Filter the results based on managers name. I feel like this will be very slow and cumbersome. I have looked at using the expand functionality on the query but can't figure out what I need to do, or if it is even possible to do this. Any insight would be much appreciated. Haven't been able to find anything throughout my web searches.1.5KViews0likes0CommentsSharePoint Framework webpart error: applicationFailedToInitializeError
Hi, I'm new in SharePoint Framework webpart development and I have an error If I deploy the new webpart to the SharePoint Online and add the webpart to the page. (If I debug the webpart its work good) Error: Can't load the application on this page. Use the browser Back button to retry. If the problem persists, contact the administrator of the site and give them the information in Technical Details. Error details: Error: applicationFailedToInitializeError Please help! Thanks, Mykie1.4KViews0likes2CommentsIssue when connecting from SPFX to Entra-enabled Azure AI Foundry resource
We have been successfully connecting our chat bot from an SPFX to a chat completion model in Azure, using key authentication. We have a requirement now to disable key authentication. This is what we've done so far: disabled API authentication in the resource Gave to the SharePoint Client Extensibility Web Application Principal "Cognitive Services OpenAI User", "Cognitive Service User" and "Cognitive Data Reader" permission in the resource In the SPFX we have added the following in the package-solution.json (and we have approved it in the SharePoint admin site): "webApiPermissionRequests": [ { "resource": "Azure Machine Learning Services", "scope": "user_impersonation" } ] To connect to the chat completion API we're using fetchEventSource from '@microsoft/fetch-event-source', so we're getting a Bearer token using AadTokenProviderFactory from "@microsoft/sp-http", e.g.: // preceeded by some code to get the tokenProvider from aadTokenProviderFactory const token = await tokenProvider.getToken('https://ai.azure.com'); const url = "https://my-ai-resource.openai.azure.com/openai/deployments/gpt-4o/chat/completions?api-version=2025-01-01-preview"; await fetchEventSource(url, { method: 'POST', headers: { Accept: 'text/event-stream', 'Content-type': 'application/json', Authorization: `Bearer ${token}` }, body: body, ...// truncated We added the users (let's say, email address removed for privacy reasons) in the resource as an Azure AI User. When we try to get this to work, we get the following error: The principal `email address removed for privacy reasons` lacks the required data action `Microsoft.CognitiveServices/accounts/OpenAI/deployments/chat/completions/action` to perform `POST /openai/deployments/{deployment-id}/chat/completions` operation. How can we make this work? Ideally we would prefer the SPFX principal to do the request to the chat completion API, without needed to have to add end users in the resource thorugh IAC, but my understanding is that AadTokenProviderFactory only issues delegated access tokens.2Views0likes0Comments