AAA, NAC, Guest Access & BYOD

 View Only
last person joined: 3 days ago 

Clearpass, CPPM, OnBoard, OnGuard, Guest, QuickConnect, AirGroup, IntroSpect

How to add HTML tag in Endpoint Context Server Action

By esupport Unpublished

  
Requirement:

This article provides the steps to create an Endpoint Context Server Action to add HTML tags inside the JSON Content.

 

Note: This article is mainly focused on Updating Endpoint Context Server action to enable HTML tags. Please visit the link below for configuring SMTP setup and creating HTTP based enforcement profile:

https://community.arubanetworks.com/browse/articles/blogviewer?blogkey=e177bab7-12b1-4dbd-ad5f-219bb824d928

 



Solution:

We can use the Endpoint Context Server action to create an API call to trigger an email. The email will be received with default text layout. If we require design, we need to use HTML tags.

Note: In this article, we used HTML tag <a href> to use it in the JSON. We can use other html tags based on the same example.



Configuration:

Creating Context Server Actions:

1. Navigate to ClearPass Policy Manager >> Administration >> Dictionaries >> Context Server Actions >> Add

2. Under Action, select Server Type: Generic HTTP, Server Name: localhost, Action Name, HTTP Method: POST, Authentication Method: None and URL: /api/email/send

3. Enter the below Header Names.

4. Enter the below JSON attributes in the Content field:

Content-Type: JSON

Content:

{
  "to": ["james-immanuvel@hpe.com"],
  "subject": "Hyperlink Test",
  "message": "Click <html><a href=\"https:\/\/arubanetworks.com\">Here<\/a><\/html> to access Aruba",
"headers": {"Content-Type":"text/html; charset=UTF-8"}
}

Note: Modify the To, Subject and messages based on the requirement. We need to use escape character for JSON to allow special characters. The above example is used to create Hyperlink using <a href> tag. We need to use headers as text/html to use HTML tags.

 



Verification

The email received with Hyperlink. 

 

0 comments
13 views