0

Currently I am trying this from the https://github.com/cljung/AzureAD-B2C-scripts,

Enable-AzureADB2CIdentityExperienceFramework -n "ABC-WebApp" -f "abc123"

which dosent seen to work. After I import the modules I am not able to connect to Azure AD B2C.

\AzureAD-B2C-scripts-master\AzureAD-B2C-scripts-master> Connect-AzureAD -TenantId AcsToHeliosB2C.onmicrosoft.com
Connect-AzureAD : The term 'Connect-AzureAD' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ Connect-AzureAD -TenantId vcbB2C.onmicrosoft.com
+ ~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Connect-AzureAD:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

otherwise I get this error

PS C:\Windows\system32> Enable-AzureADB2CIdentityExperienceFramework -n "ABC-WebApp" -f "abc123"
Enable-AzureADB2CIdentityExperienceFramework : The term 'Enable-AzureADB2CIdentityExperienceFramework' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
At line:1 char:1
+ Enable-AzureADB2CIdentityExperienceFramework -n "ABC-WebApp" -f "abc1 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Enable-AzureADB...rienceFramework:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

1 Answers1

1

I can reproduce your issue, to use this script, you need to install AzureAD module first.

Install-Module -Name AzureAD -Force

After installing it, close all the powershell sessions and open a new one, follow this link to import the module and connect to B2C tenant.

My test sample, it works on my side.

cd D:\AzureAD-B2C-scripts-master    
Import-Module D:\AzureAD-B2C-scripts-master\AzureADB2C-Scripts.psm1    
Connect-AzureADB2CEnv -t "JoyB2C"

enter image description here

After doing the first four steps successfully, the step 5 also works.

Enable-AzureADB2CIdentityExperienceFramework -n "ABC-WebApp" -f "abc123"

enter image description here

Joy Wang
  • 39,905
  • 3
  • 30
  • 54
  • Hello @Joy Wang, I just wanted to create one key policy in IEF with secret and policyname as input. I dont want the additional B2C_1A_TokenSigningKeyContainer and B2C_1A_ TokenEncryptionKeyContainer – Ashwin Agarkhed Jan 25 '21 at 17:35
  • 1
    @AshwinAgarkhed It is a new issue, I recommend you to ask it in a new post, StackOverflow avoids asking different questions in one post. – Joy Wang Jan 26 '21 at 01:14