cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
648
Views
0
Helpful
4
Replies

Self registered Guests using Phone or Sponsored employee email

abrimawi9
Level 1
Level 1
I need support in ISE (2.6) guest portal customization
1- One SSID for both sponsored and self registered users
2- Guests will select from drop down list, register by phone or through a sponsor employee email.
3- If phone number is selected, then only phone box is presented and after success registration credentials SMS to be sent to the guest phone
4- if sponsor employee email is selected. Then only email box is presented, " I am doing validation to allow only @company.domain to be added as email thanks to @Jason Kunst " and after success registration an email to be sent to the employee where he will share it with his guest
Problems:
since guest can register with phone or email. both email and phone are selected in self registration form under "Send credential notification automatically using". However, the issue is one of them will have value at a time. I tried adding default value from script, but it is not convenient. Is there a way to override and uncheck one of the email or phone for "Send credential notification automatically using" from the script based on the user selection from the drop-down?
other option I thought about is to create two self registered portals, one with phone, other with email and redirect/use based on the drop-down selection. But I am not sure how to make this work
 
Note: We don't want the guest to see the credential on the UI. only they will get it from SMS or passed to them from sponsored employee email
Please support
4 Replies 4

thomas
Cisco Employee
Cisco Employee

This sounds very custom, starting with: select from drop down list, register by phone or through a sponsor employee email.

You are trying to combine both Sponsored Guest and Self-Registered Guest flows into one. There is a reason why we keep them separate. You appear to want to combine them. Pick one.

I am having a hard time understanding the multiple things you are trying to what is being changed from the standard ISE Self-Registered Guest options. You have provided no screenshots for visual context nor any scripts.

If the standard Self-Registered Guest options will not work for you, consider creating your own custom registration server and use the ISE guestuser API to add/update/delete the guest users in ISE.

abrimawi9
Level 1
Level 1

Thanks @thomas 

The custom server option + API is indeed valid, however I thought there might be a custom way to achieve what we want through the ISE portal script.

Below you can find the script " added under Option 2 registration form"

abrimawi9_2-1668228624343.png

<script>
$("[name='selfRegForm']").focusin(function(){
$("input[name='guestUser.fieldValues.ui_person_visited']").closest(".ui-field-contain").hide();});

setTimeout(function(){

$.validator.addMethod("customemailvalidator", function(value, element) {

return /^(\w+\.?)+@company\.com$/.test( value );

}, 'Please enter a valid company email.');

jQuery("[name='guestUser.fieldValues.ui_email_address']").rules("add",{customemailvalidator:true});

}, 50);

jQuery(document).ready(function(){
setTimeout(function (){

jQuery("input[name='guestUser.fieldValues.ui_email_address']").parent().parent().hide();
jQuery("input[name='guestUser.fieldValues.ui_person_visited']").parent().parent().hide();

}, 300);

jQuery('select').on('change', function() {
if(jQuery(this).val() == 'ui_phone_number') {
jQuery("input[name='guestUser.fieldValues.ui_phone_number']").parent().parent().show();
jQuery("input[name='guestUser.fieldValues.ui_email_address']").parent().parent().hide();
jQuery("input[name='guestUser.fieldValues.ui_email_address']").val("zzzbbbaaa@company.com");
jQuery("input[name='guestUser.fieldValues.ui_person_visited']").val("zzzbbbaaa@company.com");
}
else if(jQuery(this).val() == 'ui_person_visited') {
jQuery("input[name='guestUser.fieldValues.ui_phone_number']").parent().parent().hide();
jQuery("input[name='guestUser.fieldValues.ui_email_address']").parent().parent().show();
jQuery("input[name='guestUser.fieldValues.ui_phone_number']").val("33552255");
}
});
});


$("[name='selfRegForm']").submit(function(){
$("input[name='guestUser.fieldValues.ui_person_visited']").val($("input[name='guestUser.fieldValues.ui_email_address']").val());
});

</script>
<select>
<option value="ui_phone_number">Register by Phone</option>
<option value="ui_person_visited">Register through company Email</option>
</select>

if you see if guest select register by email. I am adding dummy phone "33552255" and this option works. (I am also using the workaround to replace person_visited with email_address for email to be sent to Employee).

But for register by Phone , I tried to add dummy emails " zzzbbbaaa@company.com" i still get the below 

abrimawi9_0-1668228117021.png

Below both options are selected in registration form setting as guest can select any of them not both:

abrimawi9_1-1668228385094.png

I am thinking to create 2 self registration portals and based on drop down selection reference the relevant one use https://community.cisco.com/t5/security-knowledge-base/ise-hotspot-portal-with-links-to-employee-or-vendor-portals/ta-p/3643513 . so if Phone is selected , the phone only portal will have email unselected and vice versa

abrimawi9_3-1668228908182.png

Do you think this approach will wok?

abrimawi9
Level 1
Level 1

Thanks  @thomas 

The custom server option + API is indeed valid, however I thought there might be a custom way to achieve what we want through the ISE portal script.

Below you can find the script " added under Option 2 registration form"

abrimawi9_8-1668230862796.png

<script>
$("[name='selfRegForm']").focusin(function(){
$("input[name='guestUser.fieldValues.ui_person_visited']").closest(".ui-field-contain").hide();});

setTimeout(function(){

$.validator.addMethod("customemailvalidator", function(value, element) {

return /^(\w+\.?)+@company\.com$/.test( value );

}, 'Please enter a valid company email.');

jQuery("[name='guestUser.fieldValues.ui_email_address']").rules("add",{customemailvalidator:true});

}, 50);

jQuery(document).ready(function(){
setTimeout(function (){

jQuery("input[name='guestUser.fieldValues.ui_email_address']").parent().parent().hide();
jQuery("input[name='guestUser.fieldValues.ui_person_visited']").parent().parent().hide();

}, 300);

jQuery('select').on('change', function() {
if(jQuery(this).val() == 'ui_phone_number') {
jQuery("input[name='guestUser.fieldValues.ui_phone_number']").parent().parent().show();
jQuery("input[name='guestUser.fieldValues.ui_email_address']").parent().parent().hide();
jQuery("input[name='guestUser.fieldValues.ui_email_address']").val("zzzbbbaaa@company.com");
jQuery("input[name='guestUser.fieldValues.ui_person_visited']").val("zzzbbbaaa@company.com");
}
else if(jQuery(this).val() == 'ui_person_visited') {
jQuery("input[name='guestUser.fieldValues.ui_phone_number']").parent().parent().hide();
jQuery("input[name='guestUser.fieldValues.ui_email_address']").parent().parent().show();
jQuery("input[name='guestUser.fieldValues.ui_phone_number']").val("33552255");
}
});
});


$("[name='selfRegForm']").submit(function(){
$("input[name='guestUser.fieldValues.ui_person_visited']").val($("input[name='guestUser.fieldValues.ui_email_address']").val());
});

</script>
<select>
<option value="ui_phone_number">Register by Phone</option>
<option value="ui_person_visited">Register through company Email</option>
</select>

if you see if guest select register by email. I am adding dummy phone "33552255" and this option works. (I am also using the workaround to replace person_visited with email_address for email to be sent to Employee).

But for register by Phone , I tried to add dummy emails " zzzbbbaaa@company.com" i still get the below 

 

abrimawi9_9-1668230927343.png

Below both options are selected in registration form setting as guest can select any of them not both:

abrimawi9_10-1668230947573.png

I am thinking to create 2 self registration portals and based on drop down selection reference the relevant one use https://community.cisco.com/t5/security-knowledge-base/ise-hotspot-portal-with-links-to-employee-or-vendor-portals/ta-p/3643513 . so if Phone is selected , the phone only portal will have email unselected and vice versa

 

abrimawi9_11-1668230981565.png

Do you think this approach will wok? or do you have any other suggestions?

hslai
Cisco Employee
Cisco Employee

@abrimawi9  Yes, I agreed with you that 2 portals a better track. If you can't figure it out yourself, see Solved: Re: Linking one guest portal to another guest portal - Cisco Community but the support is only at best-effort basis.