Forum Discussion
What did you build last week?
waldek The use case is building a dashboard with various SPFx web apps (maybe a pre-built grid like Kendo offers) connected to the client's various services - some more custom, and some more common like Confluence. We have been trying to build custom connectors through PowerApps with schema defined with some guidance from the glorious SharePoint Cowboy, who said they looked right. We aren't sure about authentication, because most of them aren't going to support OAuth 2.0, which the tutorials we are finding mostly involve authenticating through Azure and OAuth.
As the JUNIOR junior working on the SPFx side, I'm trying to figure out what I'm pulling in since we don't have it all cemented on the connector side, and how to specifically map the schema to one of those pre-built grid view lists. It seems like on some of the examples I was looking at, the data keeps pulling from a json file that's built into the web part, and I can't figure out how that would be updated live data.
- waldekFeb 18, 2021
Microsoft
Connectors make a lot of sense if you plan to consume these APIs in Power Apps or flows. In the context of SPFx though, they don't add any value, because to use them, you'd need to build an HTTP-triggered flow that would expose the data as an API, which you already have. Instead, it would be easier to connect SPFx web parts directly to your API.
You mentioned that these APIs don't support OAuth. If this is the case, then building a proxy-API secured with AAD, which you could call from SPFx and which would relay calls to the API could help you.- LindsayTSheltonFeb 22, 2021Brass Contributor
waldek I really appreciate your input - would you have a good tutorial on getting the proxy-API secured by AAD? Part of our problem we keep running into is that it seems like all of the walkthroughs we find are doing something fundamentally different than what we are trying to accomplish, and of course we are getting different recommendations depending on who we ask without actually getting any data pulled through.
- waldekFeb 23, 2021
Microsoft
I totally understand your struggle. Like with everything unfortunately, there are multiple ways of doing things and often their effectives depends on an obscure detail.
Before I send you out to research something else, that might or might not work, what authentication model does your API support? Does it work with an API key or an app token that you need to add to every request either via query string or a header?