How to activate signin & signon facebook through azure active direct

Felipe Borges 20 Reputation points
2023-09-18T02:23:48.74+00:00

I've been following this tutorial: https://learn.microsoft.com/pt-br/azure/active-directory/develop/howto-call-a-web-api-with-postman?tabs=dotnet6&pivots=no-api

I must have let something pass, getting this error while trying to get the token from facebook & microsoft accounts in postman.

User's image

User's image

Microsoft Identity Manager
Microsoft Identity Manager
A family of Microsoft products that manage a user's digital identity using identity synchronization, certificate management, and user provisioning.
834 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
24,273 questions
0 comments No comments
{count} votes

Accepted answer
  1. Shweta Mathur 30,276 Reputation points Microsoft Employee
    2023-09-18T05:37:57.35+00:00

    Hi @Felipe Borges ,

    Thanks for reaching out.

    I understand you are trying to authenticate the Facebook or Microsoft account user in Azure AD/Microsoft Entra and getting the invalid request error.

    As per the screenshot you mentioned, you are calling the tenant specific endpoint which allows you authenticate users in your organization only.

    To authenticate Microsoft users, you need to register your application as "Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)"

    which will allow you to authenticate user from your organizations and Microsoft accounts as well.User's image

    With a multi-tenant application, as the application can't immediately tell which tenant the user is from, requests can't be sent to a tenant’s endpoint. Instead, requests are sent to an endpoint that multiplexes across all Azure AD tenants: https://login.microsoftonline.com/common/oauth2/v2.0/token

    Reference - https://learn.microsoft.com/en-us/azure/active-directory/develop/howto-convert-app-to-be-multi-tenant

    To authenticate the users from Facebook, you need to add Facebook as identity provider.

    Reference - https://learn.microsoft.com/en-us/azure/active-directory/external-identities/customers/how-to-facebook-federation-customers

    Hope this will help.

    Thanks,

    Shweta


    Please remember to "Accept Answer" if answer helped you.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.