SPFx web-part authentication with REST API not secured with AAD

Brass Contributor

Hello,

 

We know that SPFx  web-part is client-side solution.

The practical implication of this term is,  whichever APIs this web-part is dependent on,  that API must be registered and secured with Azure-AD.

It could be MS-graph or any other API  and  SPFx  has  APIs like AadHttpClient and MSGraphClient  to invoke it on behalf of the same user who has signed into SharePoint.

 

However, if my web-part wants to access some API which is a std. OAuth API but this API is NOT registered with AAD.  Instead it is registered with some other  identity solution eg., Okta,   can such API be invokable by my web-part  ??

 

If it was  MS-teams custom app,  teams  provide  java-script API to open up a modal-popup and let the custom app finish the full OAuth authentication flow with Okta.

 

Thanks.

 

 

 

 

 

 

1 Reply

@testuser7 Hello,

I want to say that I am 99% sure that this is possible. Was a while ago that I needed a third-party API, unless I created my own with Azure. 

But I do remember back in the days, when I used to use Spotify APIs, Facebook and Google maps. I would like someone else to confirm this, just to make sure! :)