SharePoint Framework (SPFx)
12 TopicsBringing Open AI into an Outlook add-in: moving to Azure Open AI
In the previous post we have learned how to use AI to help users write better business mails. We developed an add-in for Outlook that, using the AI models and the APIs provided by Open AI, can generate a business mail starting from one or two sentences and, using the Office SDK, to include it into the body of the mail. For this sample project, we have directly leveraged the APIs provided by Open AI. We created an account on their website and we obtained an API key required to manage the authentication. But what if you're an enterprise customer and you're already using Azure to host many of your applications and services? It would be great if there was a way to use the powerful models of Open AI, but leveraging at the same time the security, privacy and billing provided by Azure. Well, actually, this way exists and it's the Azure Open AI service, which is part of the Cognitive Services family. Thanks to a partnership between Open AI and Microsoft, the same exact models that you can use with the Open AI APIs are available on Azure. The way they work is very similar, but the main difference is that the whole hosting infrastructure will be provided by Azure, with all its benefits around scaling and security. In this post we're going to replace the Open AI API implementation we did the last time with a new one based on Azure Open AI.11KViews2likes1CommentBuild a Viva Connections card to display stock prices - Part 1: the backend
Recently, a customer engaged with my team because they have started to adopt Viva Connections in their company. They are happy about the experience, but they miss one piece of information that they consider important: the stock price of the company. It is quite a common use case, but Viva Connections doesn't provide this feature as built in. So, I decided: "Why not take advantage of this engagement and build something that can be useful to every customer who is adopting Viva Connections?". In this series of posts, we're going to build a Viva Connections card to display the price of any stock on the market, powered by a set of Azure services like Azure Functions and Azure Cache for Redis. This post will be focused on the backend, while in the next one we're going to build the actual card.9KViews2likes0CommentsBuild a Viva Connections card to display stock prices - Part 2: the card
Welcome back to our series of posts about building a Viva Connections card to display the stock price of a company! In the previous post we built the backend which provides the data we need to display. The backend was built using an Azure Function, in companion with the Azure Cache for Redis service to improve performance and reduce the number of API calls against Alpha Vantage, the free service we have chosen to retrieve stock information. In this post, we're going to build the actual Viva Connections card, using the SharePoint AdaptiveCard extension model.7.6KViews0likes0CommentsCreate Viva Connections extensions using SPFx with Windows and WSL
When it comes to building web applications which heavily rely on platforms like Node.js, a Linux environment is often the best choice. Thanks to the Windows Subsystem for Linux, we don't have to choose anymore or go through the hassle of setting up a virtual machine. We can run a Linux environment right inside our Windows installation. In this post, we'll focus on the experience in setting up WSL properly to build Viva Connections extensions (or any other extension based on SPFx, the SharePoint Framework) so that we can get the best of both worlds: the Windows experience, but the Linux performances when it comes to build and run our project.7.2KViews4likes0CommentsBuild a Viva Connections card to display stock prices - Part 3: deployment and security
Welcome to the final post in the series about building a Viva Connections card to display stock prices! After building the backend in the first post and the card in the second post, now it's time to deploy our solution and to take a deeper look at the security of our API.5.9KViews1like0CommentsSPFx 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.7KViews0likes4CommentsHow to create custom section layout options for SharePoint online modern site pages?
Hello Everyone, SharePoint provides default layout options below as mentioned in the screenshot. How can we create custom section layout options as per our needs? If there are any ways to create custom section layout options then please let me know your thoughts on the same. Can anyone help me with the same? Thanks1.6KViews0likes1Commentcan we skip spfx field customizer to render for a particular row if my condition satisfies
I have created a field customizer which basically masking the value in fieldA(It is a required field) by taking values from fieldB. Everything is working fine except if my fieldA and FieldB both have empty value then the end user is not able to see the Sharepoint mandatory column style like below I have used return statement but its not working. Given below the logic of my code: if(!fieldA){ return; //Here I want no rendering at all and show the default style as shown in picture but it is coming as blank } else if (fieldB == null || typeof fieldB =="undefined" || fieldB=="" || String(fieldB).trim().length ==0) { event.domElement.innerHTML=fieldA?.Label; } //in this condition I am checking if fieldB is null in that case I am keeping the original value is fieldA as no masking required else { event.domElement.innerHTML=`<div>${fieldB}</div>`; //In this case I am masking fieldB value in fieldA where both have values NanddeepNachan999Views0likes1CommentSPFx app customizer not loading on using browser back button
Hi, I am having a simple SPFx app customizer to display the site owner information on all modern pages of SP2019 site. There are links on the page that take us to different sites that run on classic mode. Now when we try to click on back button to get back to the modern site page, the app customizer does not get displayed. But after we refresh that page once, it gets displayed. Any idea what would be causing this issue?825Views0likes1CommentMicrosoft Teams tab using SharePoint Framework always interact with SharePoint Online root site
Hello Everyone, I need to create an SPFx web part that supports SharePoint Online as well as Teams So, I have created the SPFx web part to generate the app package, and added that app package to SharePoint online as suggested below links, https://learn.microsoft.com/en-us/samples/officedev/microsoft-teams-samples/officedev-microsoft-teams-samples-tab-channel-group-spfx/ https://siddharthvaghasia.com/2019/06/09/adding-spfx-webpart-to-microsoft-team-tab/ The SPFx Teams Tab deployed successfully in the Team, But the associated lists are created under the root site. Can I change the destination of the list from the root site to another site? Thanks682Views0likes3Comments