# Questions regarding B2C

**URL:** <https://community.appfarm.io/t/questions-regarding-b2c/1626>\
**Category:** Ask the community\
**Created:** [February 7, 2025, 7:31am UTC](https://community.appfarm.io/t/questions-regarding-b2c/1626 "2025-02-07T07:31:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![haider.ahmad](https://avatars.discourse-cdn.com/v4/letter/h/2bfe46/32.png) [@haider.ahmad](https://community.appfarm.io/u/haider.ahmad)\
**Post date:** [February 7, 2025, 7:31am UTC](https://community.appfarm.io/t/questions-regarding-b2c/1626/1 "2025-02-07T07:31:47Z")

</div>

Hello Community!

Questions regarding B2C, some of these sound a little wierd, but doing it for the first time.

- If we log in using B2C in an appfarm app, will we be required to have a user in appfarm or that’s not needed because of B2C
- Login through B2C, can we populate the roles from azure using app variables?
- Anyone have any experience with b2c login?

Regards  
Haider

---

<div class="post-metadata">

**Author:** ![rhys](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/rhys/32/1379_2.png) [@rhys](https://community.appfarm.io/u/rhys)\
**Post date:** [February 10, 2025, 8:47am UTC](https://community.appfarm.io/t/questions-regarding-b2c/1626/2 "2025-02-10T08:47:06Z")

</div>

Hi, and welcome to the Appfarm Community!

First, you can read more about logging in using custom auth providers for logging in using our [Appfarm documentation](https://docs.appfarm.io/reference/configuration/login/custom-auth-providers)

In regards to your questions:

- There is a checkbox when setting up custom authentication which is called “Auto Create Account”. See the screenshot under. If this checkbox is ticked, then the Appfarm user is automatically created if the user is logging in for the first time.  
 ![image](https://europe1.discourse-cdn.com/flex013/uploads/appfarm/original/2X/8/882730c65ac2677245100018daa0480ae1943826.png)

- However, if you want to map user access in Appfarm based on user access in Azure, this is currently not possible upon logging in. The best way to do this is to run a [schedule](https://docs.appfarm.io/reference/operations/schedules) which uses Microsoft Graph API to read [users](https://learn.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0&tabs=http) and their access groups from Azure. From here, you can map the users to roles in Appfarm, based on their access in Azure. This will mean that the user objects are already created and given roles automatically, so the checkbox mentioned above should in this case **not** be enabled.

Let me know if there are any further questions!

Thanks  
Rhys  
Appfarm

---

<div class="post-metadata">

**Author:** ![haider.ahmad](https://avatars.discourse-cdn.com/v4/letter/h/2bfe46/32.png) [@haider.ahmad](https://community.appfarm.io/u/haider.ahmad)\
**Post date:** [February 10, 2025, 9:25am UTC](https://community.appfarm.io/t/questions-regarding-b2c/1626/3 "2025-02-10T09:25:31Z")

</div>

Thank you Rhys for the awnser!

so this means we can autocreate without the ability to use pre-existing criteria like user or group membership, OR use pre-existing criteria like user or group membership but only with already created appfarm users. Have i understood correctly?

Thanks  
Haider

---

<div class="post-metadata">

**Author:** ![rhys](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/rhys/32/1379_2.png) [@rhys](https://community.appfarm.io/u/rhys)\
**Post date:** [February 10, 2025, 9:45am UTC](https://community.appfarm.io/t/questions-regarding-b2c/1626/4 "2025-02-10T09:45:33Z")

</div>

This is correct! When autocreating a user, Appfarm does not take any data about their access in the external system, just their name and email address.

With the use of a schedule, you can create new users and update existing users based on group information/access rights taken from Azure, and use this to keep the user list updated automatically in Appfarm. This will mean that users will need to be added in Azure and synced with Appfarm before they can log in to the Appfarm system.

Rhys
