Access on-premise Active Directory authenticated API from SPFx solution running in SharePoint 2019?

%3CLINGO-SUB%20id%3D%22lingo-sub-376188%22%20slang%3D%22en-US%22%3EAccess%20on-premise%20Active%20Directory%20authenticated%20API%20from%20SPFx%20solution%20running%20in%20SharePoint%202019%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-376188%22%20slang%3D%22en-US%22%3E%3CP%3EI%20know%20that%20we%20can%20call%20Azure%20AD%20secured%20APIs%20(e.g.%20Azure%20Functions%2C%20or%20API%20Apps%20running%20in%20an%20Azure%20App%20Service)%20from%20SPFx%20solutions%20running%20in%20SharePoint%20Online%2C%20as%20described%20in%20these%20scenarios%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fuse-aadhttpclient%22%20rel%3D%22noreferrer%20noopener%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fuse-aadhttpclient%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fweb-parts%2Fguidance%2Fconnect-to-api-secured-with-aad%22%20rel%3D%22noreferrer%20noopener%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fweb-parts%2Fguidance%2Fconnect-to-api-secured-with-aad%3C%2FA%3E%3C%2FP%3E%3CP%3EIs%20the%20same%20possible%20in%20a%20pure%20on-premise%20environment%20with%20an%20on-premise%20Active%20Directory%2C%20SharePoint%202019%20and%20a%20SPFx%20solution%20running%20there%3F%20The%20API%20I%20would%20like%20to%20call%20from%20the%20SPFx%20solution%20might%20be%20a%20REST%20API%20developed%20with%20ASP.NET%20Core%20Web%20API%20running%20on%20a%20separate%20server%20and%20requires%20authentication%2C%20but%20it%20might%20also%20be%20any%20other%20corporate%20owned%20API%20or%20Web%20Service.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-840047%22%20slang%3D%22en-US%22%3ERe%3A%20Access%20on-premise%20Active%20Directory%20authenticated%20API%20from%20SPFx%20solution%20running%20in%20SharePoint%2020%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-840047%22%20slang%3D%22en-US%22%3EHi%20do%20you%20got%20answer%20to%20this%20question%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1641118%22%20slang%3D%22en-US%22%3ERe%3A%20Access%20on-premise%20Active%20Directory%20authenticated%20API%20from%20SPFx%20solution%20running%20in%20SharePoint%2020%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1641118%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F404436%22%20target%3D%22_blank%22%3E%40Atul_Bachhav%3C%2FA%3E%26nbsp%3B.No%20i%20didn't%20get%20answer%20of%20this%20question%20and%26nbsp%3B%20spfx%20running%20on%20SharePoint%20Online.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20can%20help%20it%20would%20we%20great.%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I know that we can call Azure AD secured APIs (e.g. Azure Functions, or API Apps running in an Azure App Service) from SPFx solutions running in SharePoint Online, as described in these scenarios:

https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-aadhttpclient

https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/guidance/connect-to-api-secured-with-...

Is the same possible in a pure on-premise environment with an on-premise Active Directory, SharePoint 2019 and a SPFx solution running there? The API I would like to call from the SPFx solution might be a REST API developed with ASP.NET Core Web API running on a separate server and requires authentication, but it might also be any other corporate owned API or Web Service.

2 Replies

@Atul_Bachhav .No i didn't get answer of this question and  spfx running on SharePoint Online.

 

If you can help it would we great.

Thanks