Microsoft as Identity provider on Azure B2C - azure-ad-b2c

Recently I integrated Azure B2C to my Xamarin app. As per the requirement I want to allow user sign in with their Microsoft account. I followed the steps mention here - learn.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-setup-msa-app In this article they selected web but I selected Mobile as I am working on mobile app. But when I go to azure portal, click run now button on sign up or sign in policies blade, then click Microsoft it gives me below error -
We're unable to complete your request
Microsoft account is experiencing technical problems. Please try again later.
Here is the error URL -
https://login.live.com/err.srf?lc=1033#error=invalid_request&error_description=The+provided+value+for+the+input+parameter+'redirect_uri'+is+not+valid.+The+expected+value+is+'https://login.live.com/oauth20_desktop.srf'+or+a+URL+which+matches+the+redirect+URI+registered+for+this+client+application.&state=
I would greatly appreciate any help. Thank you!

Related

Authentication issues when trying to register new app in Azure Active Directory

I want to access the outlook API with a Python application. I followed this guide but quickly ran into authentication issues. Tried it with my existing private Microsoft account and with a new created account, but ran into authentication issues quickly. Whenever I try to do anything in the portal, I get this message:
Already checked in with the general Microsoft support. They directed me towards Azure support, but I can't reach anybody there.
I tried to reproduce the same in my environment and got the same error as below:
The error usually occurs if the Microsoft personal account is not added as an external/guest user to an Azure AD tenant.
To resolve the error, contact the Global admin to invite the account as a guest user like below:
Once the admin invites, you will get an email notification to accept the invitation like below:
After accepting the invite, the Personal Microsoft account will be added to the tenant successfully like below:
And now you will be able to access the Azure Portal without any issue and you can also create your own tenant to have admin access.
If still the issue persists, try the below:
Sign out from the active session and sign in incognito window or any different browser.
Clear browser cache and cookies and try.
Confirm whether the admin has set any External user settings that is restricting the access:
Reference:
Error AADSTS50020 - User account from identity provider does not exist in tenant - Active Directory
When looking into the Build Python apps with Microsoft Graph tutorial that you followed, one of the pre-requisites mentioned signing up for the Microsoft 365 Developer Program to get a free Microsoft 365 subscription. After you sign-up, you'll need to use the Microsoft 365 developer sandbox credentials in order to continue following the tutorial without having to leverage your own Azure AD tenant or subscription (pay-as-you-go).
Build Python apps with Microsoft Graph:
Join the Microsoft 365 Developer Program
Deploy the Developer Sandbox
Using the Microsoft 365 Developer subscription(s) info you'll be able to login to the Azure Portal or Azure Active Directory admin center.
Note: You can navigate to your developer tenant using - https://aad.portal.azure.com/<<SandboxTenantName>>.onmicrosoft.com, or when prompted to sign in use your sandboxes' admin account.
If you only signed up for a new personal Microsoft account (Outlook), you'll notice that once you sign into the Azure AD Admin Center, your Outlook.com user isn't associated with any Azure tenants, and you'll run into the authentication issue error message that you referenced, so you'll have to create your own Azure AD tenant by signing up for an Azure Free Trial or Pay-as-you-go.
I hope this helps!

How to build a simple NodeJS login using Microsoft OAuth

I have followed this tutorial (https://medium.com/authpack/easy-google-auth-with-node-js-99ac40b97f4c) to create a simple Google OAuth and I have accomplished it successfully.
Now I am trying to do the same with Microsoft and I cannot.
I have ready a lot of posts about it, but I am failing.
I have one app in the Azure Dev Portal, I have tried to send the user to the URL https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id={{my_clien_id}}&response_type=code id_token&scope=https://graph.microsoft.com/email, but I am receiving error messages only.
How can I have the user email using the Microsoft OAuth?
If you are looking for user email accounts as AD user accounts or office 365 accounts then you can go for Azure Active directory app.
If you are considering social logins like facebook or google or Microsoft then you need to search for Azure Ad B2C.
Here are some article which can help you:
Azure AD B2C
Azure AD

Android phone MFA for Azure

How to use Andoid phone as virtual MFA device for Azure portal login prompt.
https://learn.microsoft.com/en-in/azure/multi-factor-authentication/multi-factor-authentication
I see, there is an option to use smart phone in that tutorial but not much on how to use it.
Also in this link https://learn.microsoft.com/en-us/azure/multi-factor-authentication/end-user/microsoft-authenticator-app-how-to , can't find such options in azure dashboard
Thanks in advance
Do you want to enable MFA for your Azure account and install APP on your Android phone?
If I understand it correctly, we can login your Azure portal, and select Multi-Factor Authentication, like this screenshot:
More information about to enable MFA for Azure AD account, please refer to this article.
After MFA enabled, we should login https://myapps.microsoft.com, and select profile then select Additional security verification, like this:
In that page, you will find the configure settings:
After that, we can use this Microsoft Authenticator APP on your Android device.
Update:
Update2:
If your first account is Microsoft account, we can't enable MFA in Azure portal, because Microsoft Account MFA different with Azure AD MFA. About Microsoft account MFA, we can follow this article to enable it.

Can't authenticate Azure Web App with Azure AD. What am I doing wrong?

We are a teeny tiny startup. We were in Bizspark, which has now expired, but we all still have our MSDN accounts at the free level. I have commented our product code, run JsDoc3 on it to generate a documentation website. I put up a free level Web App on Azure. Works fine unauthenticated. I figured I'd throw together a small AD for the few of us in there with our Microsoft accounts, set the authentication of the app to the AD and pow, good to go. It would ask us to log in with our Microsoft accounts and all would be fine. Only we would be able to see the site with our internal code documentation. Seemed to work for me since I created everything. But everyone else I put into the AD can't authenticate. We get this error:
"AADSTS50020: User account 'joe#ourdomain.com' from identity provider 'live.com' does not exist in tenant 'Default Directory' and cannot access the application 'app-id-key' in that tenant. The account needs to be added as an external user in the tenant first. Sign out and sign in again with a different Azure Active Directory user account."
I have no idea. I've never used AD before. This is so common, I figure it must be the simplest use-case. I must be missing something stupid. All of my googling and searching Stack Exchange isn't finding me the answer though. Can someone please help me figure this out?
Thanks in advance for your help.
Please ensure you have added the external account successfully in your Azure AD tenant. In my testing , if I haven’t added the external account , I will get the same error message like yours .
To add an exits Microsoft Account to azure ad tenant ,you could follow below steps :
In the classic portal , click users in your azure ad tenant .
Click [Add User] button ,choose type : User with an existing Microsoft account :
After added , you will find the added Microsoft account in azure ad tenant like :
In addition, There are some limitations of Azure AD external users ,for example ,external users can't consent to multi-tenant applications in directories outside of their home directory . You could click here to know more about external users in azure ad.

User.ReadWrite Permissions in Azure AD

I'm developing an application that incorporates the Skype for Business Online Web SDK. I've noticed that it is not possible to access information about the signed in user's Skype account/profile (via Skype's mePerson object).
The only way that I see to do this now is by having yourself as a contact and accessing information about that account/profile, via the Skype person object. This doesn't seem possible to me as it isn't feasible to set a requirement upon every client using my application to have themselves added as a contact on Skype for Business.
This issue is related to the one posted here, on the GitHub Skype Web SDK Samples page: https://github.com/OfficeDev/skype-web-sdk-samples/issues/1
My question: Are there plans to add the User.ReadWrite Permissions in Azure AD for an application extending Skype for Business? Or, is there a known workaround to retrieve the signed in user's profile/account information, which includes status, activity, or avatar/avatarUrl?
I've also posted this on the Microsoft Azure forums:
https://social.msdn.microsoft.com/Forums/azure/en-US/27d6ebdc-f023-4829-96dd-eefb9e1aaeaf/userreadwrite-permissions-in-azure-ad?forum=SkypeWebSDK
However, I've had no response so I'm also posting here in hopes of anybody having any input. Thank you in advance.
As you might have noticed from the issue link in GitHub, the permissions for the information you're trying to grab have been turned on in Azure AD.
You can plug in your Azure AD settings into the Interactive Web SDK to see it in action: https://ucwa.skype.com/websdk
Before you sign in, you'll need to do the following in the Azure AD management console:
Update your app to use the permissions in the image
Change your app's reply URL to this: https://ucwa.skype.com/websdk
Make sure you turn on OAuth implicit flow by modifying your app's manifest. Steps here https://msdn.microsoft.com/en-us/library/office/mt622687%28v=office.16%29.aspx?f=255&MSPPError=-2147217396 under "Configure your app for OAuth implicit grant flow"
Paste your app's Azure client ID into the "Client id" field on https://ucwa.skype.com/websdk
After you sign in, you'll notice one of the examples in the left hand navigation will let you view the signed-in user's presence, ID, etc.
I've also created a forked version of the Web SDK samples that you can easily update with your own Azure AD settings and deploy to your localhost. You might find this more useful for playing around than the hosted Interactive Web SDK.
https://github.com/tamhinsf/skype-web-sdk-samples

Resources