Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sub Tenant #261

Open
mattboston opened this issue Oct 14, 2022 · 6 comments
Open

Sub Tenant #261

mattboston opened this issue Oct 14, 2022 · 6 comments
Labels
question Further information is requested

Comments

@mattboston
Copy link

We are trying to build out our Azure account with an Azure Active Directory B2C sub-tenant. For most of the resources in parent tenant, aztfy works fine, but we're unable to get it to run against the sub-tenant. I was finally able to use "az login" to log into the sub-tenant. In the pic, the sub-tenant's parent is QA.

Because the only resource in the sub-tenant is AAD B2C directory and Active Directory, there's no Resource Group defined. So when I try to run "aztfy rg *" I get the following error in the second pic.

Screenshot_18
Screenshot_19

@magodo magodo added the question Further information is requested label Oct 17, 2022
@magodo
Copy link
Collaborator

magodo commented Oct 17, 2022

@mattboston Can you try the latest version of aztfy? The error in above pic is from exportTemplate call, which is now removed in the latest version.

@mattboston
Copy link
Author

Now I get the following error. With an AAD B2C sub-tenant there are no resource groups.

image

@magodo
Copy link
Collaborator

magodo commented Oct 18, 2022

@mattboston Is your resource group name *? The argument is meant to be the name of the resource group.

@mattboston
Copy link
Author

To create the AAD B2C service/sub-tenant, I created it in the parent tenant which has a RG, but I'm trying to connect to the sub-tenant which has no RG to get all the resources of the AAD B2C (all the SSO/SAML configuration). It's possible that terraform may not even be able to based on this blog post.

https://codez.deedx.cz/posts/automating-azure-ad-b2c-creation-with-terraform/

@magodo
Copy link
Collaborator

magodo commented May 24, 2023

@mattboston Have you tried to use other modes than rg, like res and query, which allows you to specify more flexible resource(s).

@mattboston
Copy link
Author

Unfortunately I haven't had much time to deal w/ this since I first posted. From what I can see Terraform/Microsoft provide very little coverage for the AAD B2C sub-tenants. So far it's the one area that we have an extremely long runbook to setup/configure B2C in each of our environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants