Hi @Sohan Dutta
seems your ask is not possible, because Microsoft Entra Application Proxy and Azure AD B2C are two different things. Microsoft Entra Application Proxy provides secure remote access to on-premises web applications for work force tenant (Microsoft Entra ID) which is work for internal organization. whereas Azure AD B2C is another tenant which is for external users, login with their preferred social, enterprise, or local account identities.
The Azure AD B2C is not compatible to Microsoft Entra Application Proxy.
Call Rest API hosted via Application Proxy from React Native Android App
I have Rest API developed using Django Rest Framework, which is running in an internal corporate server and make public using Microsoft Application Proxy (Pre-Authentication enabled using Microsoft Entra ID).
I have followed the steps mentioned here
https://learn.microsoft.com/en-us/azure/active-directory-b2c/configure-authentication-sample-android-app?tabs=kotlin
https://learn.microsoft.com/en-us/entra/identity/app-proxy/application-proxy-configure-single-sign-on-with-headers
I have enabled Azure OAuth SSO in my React Native App with react-native-app-auth https://commerce.nearform.com/open-source/react-native-app-auth/docs/providers/azure-active-directory
SSO is working fine and I'm able to get the access_token and passing the access_token in Authorization Header as Bearer Token. I was expecting from the docs, this will not throw Entra login screen, but it is and therefore I'm unable to call the API.
But I also added a WebView in the app, from there I'm logging in with Azure AD SSO which is working.
Once I login to the Django App from the WebView, I'm able to call the Rest API.
I'm not sure why I need to login via WebView once to call the API, my though was enabling Header Based SSO and passing the access token should be enough. But it is not working as expected.
Already, spent several weeks on this and help will be appreciated. Thanks.
1 answer
Sort by: Most helpful
-
Akhilesh Vallamkonda 11,755 Reputation points Microsoft Vendor
2025-02-05T19:19:07.5233333+00:00