#Creation of Tenant with bicep

1 messages · Page 1 of 1 (latest)

spice pilot
#

Anyone able to see if this is a bad chicken & egg scenario related to bicep + new tenant.
Steps:
1: Creation of b2c tenant using bicep:
2: Find tenantID of b2c tenant. <- My brain shuts down here, and the step below because this must all run as a deploymentScript in bicep/arm which means. Because whatever MI I'll make won't have any permissions in the b2c tenant....?
3: Login via either azps module of some sort or az cli to create app registration in b2c tenant.
4: Add custom policy XML via graph (should be fine if I'm able to create app).

lethal nimbus
#

Probably saner to bootstrap the tenant then let iac manage the rest

#

In theory the account that creates a tenant becomes a global admin but not really sure if that even applies to service principals

#

Plus you'd have to switch authentication contexts somehow mid template

spice pilot
#

The plan was to build something as a Managed Application in the marketplace. Which kind of exclude any kind of IaC. I’m going to try and creating a tenant using MI tomorrow and see if it is possible to do it like that.

sinful blade
#

that looks very "AI" generated answer there...

livid vault