B2C Orchestationstep phone verify default value - mobile

I have this orchestation steps:
<OrchestrationStep Order="1" Type="ClaimsExchange">
<ClaimsExchanges>
<ClaimsExchange Id="PasswordResetUsingEmailAddressExchange" TechnicalProfileReferenceId="LocalAccountDiscoveryUsingEmailAddress" />
</ClaimsExchanges>
</OrchestrationStep>
<OrchestrationStep Order="2" Type="ClaimsExchange">
<ClaimsExchanges>
<ClaimsExchange Id="PhoneFactor-Verify" TechnicalProfileReferenceId="PhoneFactor-InputOrVerify" />
</ClaimsExchanges>
</OrchestrationStep>
this technical profile for first orchestation step:
<TechnicalProfile Id="LocalAccountDiscoveryUsingEmailAddress">
<DisplayName>Reset password using email address</DisplayName>
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Metadata>
<Item Key="IpAddressClaimReferenceId">IpAddress</Item>
<Item Key="ContentDefinitionReferenceId">api.localaccountpasswordreset</Item>
</Metadata>
<CryptographicKeys>
<Key Id="issuer_secret" StorageReferenceId="B2C_1A_TokenSigningKeyContainer" />
</CryptographicKeys>
<IncludeInSso>false</IncludeInSso>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="email" PartnerClaimType="Verified.Email" Required="true" />
<OutputClaim ClaimTypeReferenceId="objectId" />
<OutputClaim ClaimTypeReferenceId="userPrincipalName" />
<OutputClaim ClaimTypeReferenceId="authenticationSource" />
</OutputClaims>
<ValidationTechnicalProfiles>
<ValidationTechnicalProfile ReferenceId="AAD-UserReadUsingEmailAddress" />
</ValidationTechnicalProfiles>
</TechnicalProfile>
and this technical profile for second orchestation step:
<TechnicalProfile Id="PhoneFactor-InputOrVerify">
<DisplayName>PhoneFactor</DisplayName>
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.PhoneFactorProtocolProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Metadata>
<Item Key="ContentDefinitionReferenceId">api.phonefactor</Item>
<Item Key="ManualPhoneNumberEntryAllowed">true</Item>
</Metadata>
<CryptographicKeys>
<Key Id="issuer_secret" StorageReferenceId="B2C_1A_TokenSigningKeyContainer" />
</CryptographicKeys>
<InputClaims>
<InputClaim ClaimTypeReferenceId="userPrincipalName" PartnerClaimType="UserId" />
<InputClaim ClaimTypeReferenceId="strongAuthenticationPhoneNumber" />
</InputClaims>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="Verified.strongAuthenticationPhoneNumber" PartnerClaimType="Verified.OfficePhone" />
<OutputClaim ClaimTypeReferenceId="extension_655ae1ae68ed4c84a951961db1d40222_doblefactor" />
<!-- TODO: OutputClaim ClaimTypeReferenceId="userAssertedPhoneNumber" /-->
</OutputClaims>
<UseTechnicalProfileForSessionManagement ReferenceId="SM-MFA" />
</TechnicalProfile>
I need to use my mobile phone information as default
Do you have an example for this?
Thank you

You have to read the "strongAuthenticationPhoneNumber" claim in the first orchestration step.
Add the "strongAuthenticationPhoneNumber" claim as an <OutputClaim /> to the "AAD-UserReadUsingEmailAddress" technical profile.
Add the same claim as an <OutputClaim /> to the "LocalAccountDiscoveryUsingEmailAddress" technical profile.
It should then be passed as an <InputClaim /> to the "PhoneFactor-InputOrVerify" technical profile.

I think whatyou want to do is replicate the answer to this question except change mobile to email
Triggering email verification

Related

How to deploy a multi-page react application in IIS server?

I have created a multipage application using reactjs and have manage the routing using react router-dom. I tested it using npm start and it is working fine. The pages are properly redirecting. But when I run "npm run build" and add it to IIs server, only the home page is coming. No matter what link I click on, I am getting redirected to the home page.
I tried modifying the web.config file.
`
<?xml version="1.0"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="React Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_URI}" pattern="^/(api)" negate="true" />
</conditions>
<action type="Rewrite" url="/index.html" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
`
But it seems the index.html is not updated with the rest of the pages other than the homepage. My user routes are `
<BrowserRouter>
<Routes>
<Route exact path="/" element={<HomepageAtm />} />
<Route
exact
path="/New-Registration"
element={<RegistrationAtm />}
/>
<Route exact path="/View" element={<VIEW_ATM />} />
<Route exact path="/List_View" element={<LIST_VIEW />} />
<Route exact path="/Airport_View" element={<AIRPORT_VIEW />} />
<Route exact path="/Map_View" element={<MAP_VIEW />} />
<Route exact path="/History_Data" element={<History_Data />} />
<Route exact path="/ContactUs" element={<Contact />} />
<Route exact path="/Terminalarea_View" element={<TERMINALAREA_VIEW />} />
</Routes>
</BrowserRouter>
`
I also tried using HashRouter but the results were same. Except for the home page, no other pages are loading.

IIS proxy reverse

Pay attention to the following examples.
subdomain1.sample.com => target.sample.com/1001
subdomain1.sample.com/order => target.sample.com/1001/order
subdomain1.sample.com/login => target.sample.com/1001/login
subdomain2.sample.com => target.sample.com/1002
subdomain2.sample.com/order => target.sample.com/1002/order
subdomain2.sample.com/login => target.sample.com/1002/login
A reactjs project is running on target.sample.com, which is as follows
/ ==>‌ page not found
/:id ==> home
/:id/login ==> page login
/:id/order ==> page order
We want to do this in IIS with the help of proxy reverse or rewrite.
Below are the settings of the web.config file related to the subdomain1.sample.com address
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="http_to_https" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" appendQueryString="false" />
</rule>
<rule name="proxy" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="https://target.sample.com/1001/{R:1}" />
</rule>
</rules>
<outboundRules>
<rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1">
<match filterByTags="A, Form, Img" pattern="^https://target.sample.com/1001/(.*)" />
<action type="Rewrite" value="https://subdomain1.sample.com/{R:1}" />
</rule>
<preConditions>
<preCondition name="ResponseIsHtml1">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" path="https://{HTTP_HOST}{REQUEST_URI}" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
</configuration>
such an error can be seen in the browser console
Uncaught SyntaxError: Unexpected token '<' (at main.697bcedd.js:1:1)
Have I gone the wrong way? How can I solve this problem?

.net core 3.1 web.config with routing

I tried publish my project on hosting, but I have some issues.
I have SPA (react) in same folder as .netCore(rest api).
I want SPA routing, thats why I set rule in web.config, but it is not working. When I remove handlers ("aspNetCore") section from config, it is works, but restApi doesnt.
Can anyone help me with web.config?
I just want routing with react and have working restapi on same domain myDomain.com/api.....
Thank you.
My web.config.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<rewrite>
<rules>
<rule name="redirect all requests" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" />
</conditions>
<action type="Rewrite" url="index.html" appendQueryString="true" />
</rule>
</rules>
</rewrite>
<aspNetCore processPath=".\Horseedo.Api.exe" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
</system.webServer>
</location>
</configuration>
<!--ProjectGuid: 654874ba-ab44-4982-a101-ee05ba73cc4e-->

Unresolved reference to symbol 'Directory:Component_A.Binaries' in section 'Fragment:'

I have two simple console app projects "Component-A" and "Component-B" which I want to include in my SetupWixDemo project in my solution.
In my Wix project file for Setup I have enabled Harvesting project
<PropertyGroup>
<EnableProjectHarvesting>True</EnableProjectHarvesting>
</PropertyGroup>
and included the two projects using HeatProject
<ItemGroup>
<HeatProject Include="..\Component-A\Component-A.csproj">
<ProjectOutputGroups>Binaries</ProjectOutputGroups>
<Link>Component-A.csproj</Link>
</HeatProject>
<HeatProject Include="..\Component-B\Component-B.csproj">
<ProjectOutputGroups>Binaries</ProjectOutputGroups>
<Link>Component-B.csproj</Link>
</HeatProject>
</ItemGroup>
It has generated the components wix files correctly
Generated _Component_A.wxs
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<DirectoryRef Id="Component_A.Binaries">
<Component Id="cmpC008F1473856A259012D9243F2FAA367" Guid="*">
<File Id="fil76224611BE6FE33E8C4C1CB922BE4507" Source="$(var.Component-A.TargetDir)\Component-A.exe" />
</Component>
<Component Id="cmp8F2527F5846E0A97DD990421A1BFE039" Guid="*">
<File Id="fil2887E426D398DC77AF53475EC6CC8E82" Source="$(var.Component-A.TargetDir)\Component-A.exe.config" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
<ComponentGroup Id="Component_A.Binaries">
<ComponentRef Id="cmpC008F1473856A259012D9243F2FAA367" />
<ComponentRef Id="cmp8F2527F5846E0A97DD990421A1BFE039" />
</ComponentGroup>
</Fragment>
</Wix>
Generated _Component_B.wxs
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<DirectoryRef Id="Component_B.Binaries">
<Component Id="cmpC4EEFA1957E631623A020D230FE7FE27" Guid="*">
<File Id="fil027682CC235FE3E8DB7E93B17A690B4E" Source="$(var.Component-B.TargetDir)\Component-B.exe" />
</Component>
<Component Id="cmp5DCF4C7D83433EA092BBF18737C93FB1" Guid="*">
<File Id="filA4BD1B738072866436267073D1E70237" Source="$(var.Component-B.TargetDir)\Component-B.exe.config" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
<ComponentGroup Id="Component_B.Binaries">
<ComponentRef Id="cmpC4EEFA1957E631623A020D230FE7FE27" />
<ComponentRef Id="cmp5DCF4C7D83433EA092BBF18737C93FB1" />
</ComponentGroup>
</Fragment>
</Wix>
Product.wxs
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="SetupWixDemo" Language="1033" Version="1.0.0.0" Manufacturer="WK" UpgradeCode="60e5ca62-51b5-47d3-81b5-a36b078c88c5">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Platform="x64"/>
<MajorUpgrade DowngradeErrorMessage="A newer version of SetupWixDemo is already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" Title="SetupWixDemo" Level="1">
<ComponentGroupRef Id="Component_A.Binaries" />
<ComponentGroupRef Id="Component_B.Binaries" />
</Feature>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
<UIRef Id="WixUI_InstallDir" />
</Product>
<Fragment>
<SetDirectory Id="INSTALLFOLDER" Value="[WindowsVolume]Apps\WixDemo" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles64Folder">
<Directory Id="INSTALLFOLDER" Name="SetupWixDemo" />
</Directory>
</Directory>
</Fragment>
</Wix>
I keep getting the following.
Unresolved reference to symbol 'Directory:Component_A.Binaries' in section 'Fragment:'
Unresolved reference to symbol 'Directory:Component_B.Binaries' in section 'Fragment:'
What am I doing wrong ?
UPDATE:
Found a fix for this error . Realized I need to include both the Directory entry for both components
<Fragment>
<SetDirectory Id="INSTALLFOLDER" Value="[WindowsVolume]Apps\WixDemo" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles64Folder">
<Directory Id="INSTALLFOLDER" Name="WixDemo" />
<Directory Id="Component_A.Binaries" Name="WixDemo" />
<Directory Id="Component_B.Binaries" Name="WixDemo" />
</Directory>
</Directory>
</Fragment>
Though now its not installing anything and no errors.
Found the remaining issue. It was installing under program files. So had to include SetDirectory tag for each component and that fixed it.
<Fragment>
<SetDirectory Id="INSTALLFOLDER" Value="[WindowsVolume]Apps\WixDemo" />
<SetDirectory Id="Component_A.Binaries" Value="[WindowsVolume]Apps\WixDemo" />
<SetDirectory Id="Component_B.Binaries" Value="[WindowsVolume]Apps\WixDemo" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles64Folder">
<Directory Id="INSTALLFOLDER" Name="WixDemo" />
<Directory Id="Component_A.Binaries" Name="WixDemo" />
<Directory Id="Component_B.Binaries" Name="WixDemo" />
</Directory>
</Directory>
</Fragment>

How do I Insert a node into sql xml column using Sql Server 2008?

Hi All
I have a document with this structure.
<Employee>
<Group Id="1">
<Employee Id="2" />
<Employee Id="3" />
<Employee Id="4" />
<Employee Id="5" />
<Group Id="2">
<Employee Id="6" />
<Employee Id="7" />
<Employee Id="8" />
<Employee Id="9" />
</Group>
</Group>
<Group Id="3">
<Employee Id="10" />
<Employee Id="11" />
<Employee Id="12" />
<Employee Id="13" />
<Employee Id="14" />
</Group>
</Employee>
As you can see Group 1 has a "SubGroup" if you like called Group id 2
I need to insert another subgroup into Group Id 1 AS follows
<Group Id="4">
<Employee Id="15" />
<Employee Id="16" />
<Employee Id="17" />
<Employee Id="18" />
<Employee Id="19" />
</Group>
The result will be that GROUP 1 will have 2 subgroups .
How can do it?
Any suggestions? Never used sql xml.
thanks!
Read XML data, change XML, store XML.
Insert / Update is not supported by SQL Server. XML data type is not a replacement for using the relational engine. It is for storing YXML Structured document data (and supports query based on it).

Resources