aad-for-linux / pam_aad

Azure Active Directory PAM Module
GNU General Public License v3.0
22 stars 9 forks source link

Implement templates for emails #14

Open oxr463 opened 2 years ago

oxr463 commented 2 years ago

Currently defined in the source as,

#define USER_PROMPT "An email with a one-time passcode was sent to your email." \
              "\nEnter the code at https://aka.ms/devicelogin, then press enter.\n"

Template should be stored in /etc/aad/template.d/, (See: CyberNinjas/libnss_aad#5); or similar; add this to the config file via template_dir.

Example

Contents of /etc/pam_aad.conf:

{ 
  "client": {
    "id": "{{client_id}}"
  },
  "domain": "{{domain}}",
  "group": {
    "id": "{{group_id}}"
  },
  "smtp_server": "{{smtp_server}}",
  "tenant": {
    "name": "{{organization}}.onmicrosoft.com",
    "address": "{{organization_email_address}}"
  },
  "template_dir": "{{template_dir}}"
}

Source: https://github.com/CyberNinjas/pam_aad/issues/37