I want to sign in to azure b2c using graph api in C#

Aashique Ali Shah 0 Reputation points
2023-06-21T08:57:59.43+00:00

Hello,

I am trying to use the azure b2c in Dotnet core and react js application i want to use the graph api for sign in and sign up as shown in following example

https://github.com/Azure-Samples/ms-identity-dotnetcore-b2c-account-management/tree/master/src

i am able to create user on azure b2c but facing issue on sign in as i m getting password profile null

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,816 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,685 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,963 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,476 Reputation points Volunteer Moderator
    2023-06-21T15:41:46.8933333+00:00

    your question is not clear. the sample app uses a service account (clientid & secret), and does not support login. it just a demo of common graphapi calls

    if you are using react, then you probably want to use msal.js for login:

    https://learn.microsoft.com/en-us/azure/active-directory/develop/msal-b2c-overview

    there is also a react wrapper:

    https://learn.microsoft.com/en-us/azure/active-directory-b2c/enable-authentication-react-spa-app


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.