Flutter Login using Azure Active directory - azure

I am using Flutter for our Mobile application. and I am having trouble with Login user and get Auth token.
I have tried https://medium.com/flutter-community/flutter-azure-authentication-with-ad-b2c-8b76c81dd48e this article approach. My AAD is B2B. But after logged in I get a error in pop up:
Cannot GET /auth/openid/return
Any suggestion or article, documentation would be helpful.

Currently there is no native SDK for Flutter to integrate with Azure AD.
There is already a similar User voice.. You can vote for it or else you can create a new one.

I have used a pub.dev/packages/aad_oauth#-readme-tab this package to get acces token.
Even tough My app service was not b2c, I could successfully logged in and log out.

Related

how to get user profile with azure ad in flutter

how can I retrieve current user profile from an azure ad in flutter mobile app
I have used this flutter package and followed the example(not b2c). I can only retrieve the Access Token but not the user data like email and user names.
Is there anyone who got this?
Not familiar with Flutter but to get the information about a user, you will need to use Microsoft Graph API.
I searched for Microsoft Graph using this link: https://pub.dev/packages?q=microsoft+graph and it showed me some packages. Hopefully you should be able to pick the right package.

Responding to Login Succeeded for Blazor Web Assembly App and Azure AD B2C

I have a Blazor Web Assembly App that successfully authenticates against Azure AD B2C. Whenever the user successfully authenticates, or logs in, I want to fetch some additional profile information from another service/database.
I feel/think the answer is somewhere in this article https://learn.microsoft.com/en-us/aspnet/core/security/blazor/webassembly/additional-scenarios?view=aspnetcore-3.1, but for the life of me, everything I try fails.
Wondering if anyone else has tried this and has been successful?
Thanks in advance!
After contacting the Blazor team, this is what they recommended https://learn.microsoft.com/en-us/aspnet/core/security/blazor/webassembly/additional-scenarios?view=aspnetcore-3.1#customize-the-user.

Cannot authenticate Azure Bot with AAD (bot sdk 4)

I tried the tutorial on the official site and followed all the steps. If I test the azure bot service from azure portal, it asks for signin and gives me access token. But when I'm trying from Bot emulator, the request url for login seems odd
If I click confirm, it's signing me in directly without redirecting to azure login page and shows me the following
This does not look like an access token. Am I missing something here?
Btw, I just changed the appsettings.json file from the tutorial with my app id and secrets. Nothing else is changed. I've also made the service principle and granted permission. So there should not be any problem. I am just getting started with azure bot service. So any advice will be appreciated :)
Could you pls have a check that if you configed ngrok for your bot emulator ?
I got the same issue on my side if I remove ngrok setting in my bot emulator.Maybe it caused some networks issues while bot emulator communicating with Azure platform.
You can download it from previous link and config it on your bot emulator here :
Hope it helps :)

Microsoft bot emulator azure AD oauth does not give options to select the account to log in

I developed a bot with microsoft bot framework nodejs version4. I used azure AD oauth connection for the bot authentication. Initially when I try to login it shows me list of account to authenticate, but now it shows the empty window and does not allow me to select the account, by default it selects recent logged in account.
I does not know why this happens.Need help to solve
It sounds like you're having two issues.
First, you say you're getting a blank sign-in screen in Emulator. Bot Framework Emulator 4.4.1 has a bug involving OAuth cards: https://github.com/microsoft/BotFramework-Emulator/issues/1544
Try configuring Emulator to use a magic code:
Second, you say Skype is using a previously signed-in account. Please refer to the samples in order to see how to sign a user out.
const botAdapter = innerDc.context.adapter;
await botAdapter.signOutUser(innerDc.context, this.connectionName);

Using ADAL to invoke Azure Service Management API

I have created an Azure AD native client application and have given delegated permissions to Azure Service Management API. Now, I'm able to invoke the service management API using my id from a Windows Phone 8.1 app using ADAL library. However, another user can't invoke operations on their subscription even though I add them as co-administrator in my directory. I get the token for the user but when I try to make an API call, I get 'Invalid token:A security token exception occurred for the JWT token'. Is there a way to allow another user to access details about his subscriptions using ADAL authentication from an AD app hosted in someone else's AD? I have searched for any related information for quite some time and I'd gladly take any help.
Here is what I interpret what you are doing.
You have a native app and it is connected to your tenant and it works fine for accessing service management APIs in your tenant/subscription.
You gave the app to a friend and they are trying to use it to access service management APIs in their tenant/subscription.
The suggestion above in the comment is on the right track, but you need to look at the steps for making your native application multi-tenant. This way, the AD service will know to look for the tenant for the authenticated user. Changing the url to use 'common' instead of the tenant id is one of the steps required. Here are a couple of posts to help with that transition.
http://www.cloudidentity.com/blog/2013/04/09/walkthrough-3-developing-multi-tenant-web-applications-with-windows-azure-ad/
This is a native client example of multi-tenant for a windows store app. I could not find one in the repo for a phone app. Hopefully, this gets you on the right track.
https://github.com/AzureADSamples/NativeClient-WebAPI-MultiTenant-WindowsStore

Resources