I used Azure auth login(AD B2C) in my app.After successful login i am getting accesstoken, Using this token, i am accessing api's.
In my app i have to open webpage which needs azure authentication. So without login how to access azure authenticated webpage from mobile app.
Related
I have a web app that already configured with Azure Ad, once user login the web app via azure ad, they web app will redirect it to identity server and then successfully logged in to the website. However, currently we have to implement the azure ad login in our flutter mobile app also. For calling the web app API, we have to get access token generated from the web app identity server. So the problem is that is there a solution to directly allow my mobile app to login through the azure ad page configured for my web app and get access token directly in my flutter app? Or is there other suggestions?
Retrieving access token directly from the web api through AAD identity authentication and passing it to the flutter app for authentication purposes isn't possible. Though, you can add/show a redirect URL or callback url link to the flutter app in your web app display api which is registered in azure app registration portal such that when a user tries to log in to flutter app, it will be redirected to the flutter app site and in the flutter app backend, you can configure it to federate with AAD for authentication and authorization purpose.
References:
flutter_aad_oauth
How to integrate Azure AD SSO in flutter app
You can also raise a support request if needed via overview page in portal> support + troubleshooting >new support request
I have two Azure Web Apps, one is a website and acting as the front-end, the other one is an API and acting as the backend. I would like to add authentication to this solution so only the front-end can access the backend. To do this, I've configured AAD authentication on the backend Web App with the express option that creates a new Azure AD application configured with the correct reply URL, API permissions (User.Read), etc. When I then navigate to the backend Web App URL, I need to sign-in with my Azure AD credentials.
Which steps do I need to take to restrict that so I as an user cannot login and only the front-end Web App can authenticate to the backend API?
For example, I can set the "Authorized client applications" on the Azure AD application of the backend API. However, I need to have an application ID to add an authorized client and I would like to use the Managed Identity of the front-end Web App for this, not a new and additional Azure AD application.
Any idea how to do this?
This is weird, if the login screen still appears, there is a problem with your code configuration, because the client credential flow does not involve user interaction.
I found a useful sample for your reference, this sample application shows how to use the Microsoft identity platform to access the data from a protected Web API, in a non-interactive process. It uses the OAuth 2 client credentials grant to acquire an access token, which is then used to call the Web API.
Here Is What I'm Doing.
I Have Use MSAL authentication in Xamarin forms app. I have Successfully login and I have also get the access Token which I used to access SharePoint WebAPI. Now I have created Mobile app Service in Azure App Service. When I'm going to access this protected API with Azure Existing Authentication with the Same token, the Response is 401 unauthorized. Anyone help me how I should now call this Azure Protected API
I am trying to access a azure hosted service using the windows client. It is required to register the windows client with Azure AD and the get the application id for requesting the authentication token/sign-in.
For web apps this is not needed. The browser itself will automatically re-direct to the login page for authentication and the token is getting cached in the cookie.
Is it possible for the windows client to sign-in to the azure ad similar to web apps without needing to register itself?
This is what i have at the moment :
A React.JS web application which signs in the user to azure ad with the tenant. I'm using https://github.com/salvoravida/react-adal/ for the sign in. With the user authenticated, I am able to get user information from the Microsoft Graph API
A Node.JS Web API which accesses the database. The routes are not secured with Azure AD as yet
What i'm trying to understand/implement :
- The React.JS web app passes the user token for each request to the Web API
- The Web API validates the azure AD token before sending the response
My question now is: Is this actually the right way to do it ? I've tried this sample from Microsoft https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-v1-nodejs-webapi but i'm not sure what kind of token it is suppose to accept.
Thank you for your help.