'Azure's Graph api passwordprofile NULL for b2c users

Users sign up/login via Azure AD B2C using Identity provider Local Account-Email.

I can see users signed up (with their password) for the tenant: enter image description here When I run example "Manage User Accounts with Graph API" to check for local identity passwordProfiles they show null. My assumption is this property is automatically populated when a user creates the password same as other User resources.

Can someone give me some guidance what I'm missing?

    public static async Task GetUserByIssuerAssignedID(AppSettings config, GraphServiceClient graphClient)
        {
            Console.Write("Enter user sign-in name (username or email address): ");
            string userName = Console.ReadLine();

            Console.WriteLine($"Looking for user with sign-in name '{userName}'...");

            try
            {
                // Get user by sign-in name
                var result = await graphClient.Users
                    .Request()
                    .Filter($"identities/any(c:c/issuerAssignedId eq '{userName}' and c/issuer eq '{config.TenantId}')")
                    .Select(e => new
                    {
                        e.PasswordProfile,
                        e.DisplayName,
                        e.Id,
                        e.Identities
                    })
                    .GetAsync();

                if (result != null)
                {
                    Console.WriteLine(JsonConvert.SerializeObject(result));
                }

enter image description here Thank you for your help



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source