spfx
114 TopicsIssue 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.3Views0likes0CommentsExport / Import from Excel file in SharePoint (SPFx)
Here is the tool which will help you to import excel file into a list. This tool will not create any kind of list or column. It will help users to import their excel file in specific list. This tool also allows users to update existing records directly from excel file. I have develop the tool in SharePoint Framework. Currently this tool is for SharePoint Online version only. We are supporting following columns : Single line of text Multiple lines of text Number Yes/No Person or Group (Person + Group) Person or Group (Person + Group) (Allow multiple selections) Date and Time Choice Choice (Allow multiple selections) Hyperlink or Picture Currency Managed Metadata Managed Metadata (Allow multiple values) Lookup Lookup (Allow multiple values) Installation of App :- 1. Click here to download the https://raw.githubusercontent.com/gauravgoyal5/ExportImportExcelInSharePoint.github.io/gh-pages/sps-import-from-excel.sppkg. 2. Visit the Microsoft 365 SharePoint Admin Center 3. Go to Apps -> App Catalog. If you don't have app catalog, https://www.youtube.com/watch?v=xEc8X7VVtc8. If you have Site Collection level App Catalog, just to to Apps for SharePoint from your site collection. 4. Click 'Upload' and select sps-import-from-excel.sppkg file to upload. 5. Check the box for Make this solution available to all sites in the organization and click the Deploy button. 6. A successful installation will look like this: 7. if you receive an App Package Error Message stating, "Deployment failed," as shown here, simply delete the .sppkg file and repeat steps 4 and 5 to redeploy. 8. Now go to the site where you want this tool. Just create a new page or edit existing page and add a webpart 'SPS Import From Excel'. This tool has help on each steps. You can read and start exporting or importing the excel. How To Setup How To Use Enjoy!!!5.6KViews1like4CommentsExtend Viva Connections with pre-built 3rd party Adaptive cards
Viva Connections is the gateway for the employee experience and provides an extensible platform through the dashboard, where employees can see a targeted list of actionable cards that can connect to Microsoft Teams apps, Viva apps and services, partner apps, and custom solutions using the SharePoint Framework (SPFx) framework, internal links, and external links.6.3KViews1like0CommentsViva Connections Partner Showcase - Lightning Tools
We are excited to share a Partner Showcase story on Lightning Tools. Director, Brett Lonsdale from Lightning Tools is showcasing their solutions and extensions which available for the customers from the AppSource and directly from their channels.2.4KViews2likes1CommentSharePoint Admin Center redirecting to SPFx Single Sign On Redirect Page
Hello, I've got an issue currently open with Microsoft Support however they're so far have been unable to resolve why I am being redirected to the SPFx Single Sign On Redirect Page when trying to access https://tenantname-admin.sharepoint.com/_layouts/15/online/AdminHome.aspx#/home or https://admin.microsoft.com/sharepoint I am automatically taken to this page: https://mytenant-admin.sharepoint.com/_forms/spfxsinglesignon.aspx#code=0.AS8AW0bSmouaik6V_eHePuABYHaI4Qh3YX5IuLXPlQweWYwvABo.AgABAAIAAAAmoFfGtYxvRrNriQdPKIZ-AgDs_wUA9P_WluBbcSJB8cYbx71lqqyGHXDLsQVhhZcLagG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ODE4YyIsIm1ldGEiOnsiaW50ZXJhY3Rpb25UeXBlIjoicmVkaXJlY3QifX0%3d%7chttps%3a%2f%2fmytenant-admin.sharepoint.com%2f_layouts%2f15%2fonline%2fAdminHome.aspx%23%2fhome&session_state=3eeb8686-6f12-44cd-8159-1bb6ccf45bdb&correlation_id=5318a330-f909-411b-b997-a203bf473edb Any clue on what could be causing this as it only appears to be happening with my admin account. All other admins who have the SharePoint Admin role are able to traverse to the SharePoint Admin Center correctly. and Yes, I've tried this on 4 different browsers and several different computers - all resulting in the same issue.9.6KViews1like9CommentsSharePoint 2019 - Embed.aspx page
Hello, I've implemented an SPFX solution that displays document files retrieved from document library , once clicked, it should open the document in sharepoint's embed.aspx page from the field "ServerRedirectedEmbedUrl". But this field is always empty for the documents. Also, when i try to access the embed page through the browser like "http://servername/_layouts/15/embed.aspx" i see the error bellow: how can i fix this? knowing that this functionality is working normally for SharePoint Online, but iam struggling trying to implement the same for sharepoint 2019 server.584Views0likes0CommentsTeams App that reads Excel File from Sharepoint site
Hi guys, i'm new to Teams App Development. My team leader at work asked me to start studying this technology to extend our Teams Channel (no one in my team knows how to do it). What i need are two things: 1) A better documentation and guides to Teams App, Teams Toolkit, SharePoint Framework etc. outside of official Microsoft documentation. 2) I need help to know how to go on with my project: - my goal is to make a Tab App (unfortunately i cannot make any bot 'cause of privileges problems) that reads an Excel file from a SharePoint page, extracts data from that and uses them to do XYZ operations. I started by creating a Tab with sharepoint framework, but ther's nothing i know about it. How can i do this, and which modules i need to use? thanks.840Views0likes1CommentHow to know if I can trust an SPFX webpart?
I am in the process of implementing an spfx webpart but before I need to make sure it is not a security threat. From researching I was not able to find if there is any way to run a check or provide a validation that the webpart is safe for the organization as it does ask for Graph API permissions, I do not think there is any issues with it, but I need to be able to have cleareance. This is the webpart: https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-accordion-dynamic-section1.3KViews0likes3CommentsIssue while posting the request to Sharepoint list which has more than 5000 items.
Hi, I am using below code for my spfx soution to post my caml and getting beow 500 error. private getOpenstatus() { let _openCount: string = ''; let val="In Progress"; let camlQueryPayLoad: any = { 'query' : { '__metadata': { 'type': 'SP.CamlQuery' }, "ViewXml": "<View><Query><Where><Eq><FieldRef Name='Status' /><Value Type='Text'>"+val+"</Value></Eq></Where></Query><ViewFields><FieldRef Name='ID' /></ViewFields><QueryOptions /><RowLimit>5000</RowLimit></View>" } }; let spOpts = { headers: { 'odata-version': '3.0' }, body: JSON.stringify(camlQueryPayLoad) }; const queryString: string = "$select=ID&$filter=Status eq '"+val+"'"; let url: string = this.context.pageContext.web.absoluteUrl + `/_api/web/lists/getbytitle('IncidentDetails')/GetItems?$top=5000`; return this.context.spHttpClient .post(url, SPHttpClient.configurations.v1, spOpts) .then((response: SPHttpClientResponse) => { let lvlFive: string = ''; if (response.status === 404) { //Log.error('js-display-List', new Error('List not found.')); return []; } else { if (response.ok) { response.json().then((responseJson) => { console.log(responseJson); if (responseJson != null) { let length= responseJson.value.length; _openCount +=`<a class="nav-link active" data-toggle="tab" href="#open-incident">Open<span>(<span>${length}</span>)</span></a>`; this.domElement.querySelector('#openCountView').innerHTML = _openCount; //this.domElement.querySelector('#levelFive').innerHTML = lvlFive; } }); } } }); } Below is the Response from API with 500 code. { "odata.error": { "code": "-2147024860, Microsoft.SharePoint.SPQueryThrottledException", "message": { "lang": "en-US", "value": "The attempted operation is prohibited because it exceeds the list view threshold." } } } Could you please help me how can I fix it ? I need an urgent help and would be great if i can get the quick solution.545Views0likes0Comments