10-24-2022 01:31 AM
Hi,
We have a two-node ISE deployment, version 3.1.0.518 Patch 3.
We have a customer that has a Hot-Spot portal which grants Internet access. The portal is setup with a PIN on the AUP page. When someone accesses the portal, they need to enter the PIN to allow them access to the Internet.
They have a requirement to change the PIN on the AUP page on a weekly basis.
Is it possible to automatically create a new PIN and email to a distribution list weekly? Their deployment is integrated with the Active Directory.
Solved! Go to Solution.
10-26-2022 09:30 AM
I don't have a repository set up.
First, perform a GET request to get the object ID for your Hotspot Portal
curl --include --insecure --location \
--header 'Accept: application/json' \
--user $ise_username:$ise_password \
--request GET https://$ise_cloud/ers/config/hotspotportal
Then, using the results perform another GET request to get ALL the settings from your portal:
curl --include --insecure --location \
--header 'Accept: application/json' \
--user $ise_username:$ise_password \
--request GET https://$ise_cloud/ers/config/hotspotportal/75a5bf99-ce47-422f-8f97-4f9ab4dc67f3
Using these results (and you have to use ALL the results. With the PUT request, any value that is missing is an assumed delete for that value), submit a PUT request
curl --include --insecure --location \
--header 'Content-Type:application/json' \
--header 'Accept: application/json' \
--user $ise_username:$ise_password \
--request PUT https://$ise_cloud/ers/config/hotspotportal/75a5bf99-ce47-422f-8f97-4f9ab4dc67f3 \
--data '{
"HotspotPortal": {
"name": "Hotspot Guest Portal",
"description": "Guests do not require username and password credentials to access the network, but you can optionally require an access code",
"portalType": "HOTSPOTGUEST",
"settings": {
"portalSettings": {
"httpsPort": 8443,
"allowedInterfaces": [
"eth0",
"bond0"
],
"certificateGroupTag": "Default Portal Certificate Group",
"endpointIdentityGroup": "aa178bd0-8bff-11e6-996c-525400b48521",
"coaType": "COAREAUTHENTICATE",
"displayLang": "USEBROWSERLOCALE",
"fallbackLanguage": "English",
"alwaysUsedLanguage": "English"
},
"aupSettings": {
"includeAup": true,
"requireScrolling": false
"requireAccessCode": true,
"accessCode": "ISEisC00L"
},
"postAccessBannerSettings": {
"includePostAccessBanner": false
},
"authSuccessSettings": {
"successRedirect": "AUTHSUCCESSPAGE"
},
"supportInfoSettings": {
"includeSupportInfoPage": false,
"includeMacAddr": true,
"includeIpAddress": true,
"includeBrowserUserAgent": true,
"includePolicyServer": true,
"includeFailureCode": true,
"emptyFieldDisplay": "HIDE"
}
},
"customizations": {
"portalTheme": {
"id": "9eb421c0-8c01-11e6-996c-525400b48521",
"name": "Default Blue theme"
},
"language": {
"viewLanguage": "English"
},
#######################################################################################################################
#######################################################################################################################
#######################################################################################################################
Content removed for space
The values you need are under "aupSettings", I have made them bold.
DO NOT copy/use the code above as it is only partial and will result in deleting elements from your portal
11-10-2022 08:07 AM
@Charlie Moreton I just to work on this yesterday and it worked like a dream. It is really impressive. Thanks for all your patience and your help.
10-24-2022 07:47 AM
API is the way to go! You can use the PUT request to automate the changing of the access code. I show how to do this in the video linked below. I use the PATCH command that was introduced in 3.2, and while this does make the process much simpler, I also show what is needed to use the PUT command for those versions older than 3.2.
Cisco ISE Simplifies API updates using the 'PATCH' method
You can see examples and instructions for all things API in ISE at https://cs.co/ise-api
10-24-2022 09:06 AM
10-25-2022 08:33 AM - edited 10-25-2022 08:35 AM
Your youtube video is very good. Do you have a location when all your commands are? It will save me typing them out incorrectly. It looks like I am going to have to use the UPDATE command instead of PATCH. Do you have an example for the UPDATE for changing the AUP code?
Thanks
Anthony.
10-26-2022 09:30 AM
I don't have a repository set up.
First, perform a GET request to get the object ID for your Hotspot Portal
curl --include --insecure --location \
--header 'Accept: application/json' \
--user $ise_username:$ise_password \
--request GET https://$ise_cloud/ers/config/hotspotportal
Then, using the results perform another GET request to get ALL the settings from your portal:
curl --include --insecure --location \
--header 'Accept: application/json' \
--user $ise_username:$ise_password \
--request GET https://$ise_cloud/ers/config/hotspotportal/75a5bf99-ce47-422f-8f97-4f9ab4dc67f3
Using these results (and you have to use ALL the results. With the PUT request, any value that is missing is an assumed delete for that value), submit a PUT request
curl --include --insecure --location \
--header 'Content-Type:application/json' \
--header 'Accept: application/json' \
--user $ise_username:$ise_password \
--request PUT https://$ise_cloud/ers/config/hotspotportal/75a5bf99-ce47-422f-8f97-4f9ab4dc67f3 \
--data '{
"HotspotPortal": {
"name": "Hotspot Guest Portal",
"description": "Guests do not require username and password credentials to access the network, but you can optionally require an access code",
"portalType": "HOTSPOTGUEST",
"settings": {
"portalSettings": {
"httpsPort": 8443,
"allowedInterfaces": [
"eth0",
"bond0"
],
"certificateGroupTag": "Default Portal Certificate Group",
"endpointIdentityGroup": "aa178bd0-8bff-11e6-996c-525400b48521",
"coaType": "COAREAUTHENTICATE",
"displayLang": "USEBROWSERLOCALE",
"fallbackLanguage": "English",
"alwaysUsedLanguage": "English"
},
"aupSettings": {
"includeAup": true,
"requireScrolling": false
"requireAccessCode": true,
"accessCode": "ISEisC00L"
},
"postAccessBannerSettings": {
"includePostAccessBanner": false
},
"authSuccessSettings": {
"successRedirect": "AUTHSUCCESSPAGE"
},
"supportInfoSettings": {
"includeSupportInfoPage": false,
"includeMacAddr": true,
"includeIpAddress": true,
"includeBrowserUserAgent": true,
"includePolicyServer": true,
"includeFailureCode": true,
"emptyFieldDisplay": "HIDE"
}
},
"customizations": {
"portalTheme": {
"id": "9eb421c0-8c01-11e6-996c-525400b48521",
"name": "Default Blue theme"
},
"language": {
"viewLanguage": "English"
},
#######################################################################################################################
#######################################################################################################################
#######################################################################################################################
Content removed for space
The values you need are under "aupSettings", I have made them bold.
DO NOT copy/use the code above as it is only partial and will result in deleting elements from your portal
11-10-2022 08:07 AM
@Charlie Moreton I just to work on this yesterday and it worked like a dream. It is really impressive. Thanks for all your patience and your help.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide