Select to view content in your preferred language

ArcGIS Enterprise license expiration Alert

578
8
08-25-2025 01:15 PM
TarigAhmedTXHSDS
Occasional Contributor

Hi All,

How can I create an alert for ArcGIS Enterprise (Portal and/or Server) license expiration alert e.g 30 days? 

8 Replies
VenkataKondepati
Occasional Contributor

You can set up a simple scheduled check using the ArcGIS Enterprise Admin REST API. Both Portal and Server expose license details under /system/licenses. A small Python/PowerShell script can pull the expiration date, compare it with today, and if less than 30 days remain, trigger an email/Teams/Slack alert. I usually recommend scheduling it daily (Task Scheduler or cron) so admins get proactive notifications and avoid any last-minute disruptions.

Using the ArcGIS Enterprise REST Admin API

  • Portal and Server both expose license info via the admin API.

    • Portal:
      https://<portal.domain.com>:7443/arcgis/portaladmin/system/licenses

    • Server:
      https://<server.domain.com>:6443/arcgis/admin/system/licenses

  • The JSON response includes details like expiration date.

  • You can write a Python/PowerShell script that:

    1. Authenticates with admin credentials.

    2. Fetches license details.

    3. Compares today’s date with expiration date.

    4. If < 30 days remaining, send an email, Teams/Slack message, or log entry.

 

Python Example (Portal)

import requests
import datetime
import smtplib

portal_url = "https://yourportal.domain.com:7443/arcgis/portaladmin/system/licenses"
username = "admin"
password = "yourpassword"

# Get token
token_url = "https://yourportal.domain.com:7443/arcgis/sharing/rest/generateToken"
payload = {
    "username": username,
    "password": password,
    "client": "requestip",
    "f": "json"
}
token = requests.post(token_url, data=payload, verify=False).json()["token"]

# Get license info
params = {"token": token, "f": "json"}
resp = requests.get(portal_url, params=params, verify=False).json()

expiration_str = resp["licenses"][0]["expiration"]  # adjust index based on structure
expiration_date = datetime.datetime.strptime(expiration_str, "%Y-%m-%d")

days_left = (expiration_date - datetime.datetime.today()).days

if days_left <= 30:
    # Example: Send email
    server = smtplib.SMTP("smtp.yourdomain.com", 25)
    msg = f"Subject: ArcGIS License Expiration Alert\n\nLicense expires in {days_left} days!"
    server.sendmail("noreply@yourdomain.com", "admin@yourdomain.com", msg)
    server.quit()

 

 

TarigAhmedTXHSDS
Occasional Contributor

Thank you VenkataKondepati. I was hoping for a built functionality in ArcGIS Monitor.

0 Kudos
TarigAhmedTXHSDS
Occasional Contributor

TarigAhmedTXHSDS_0-1756395094062.png

For now, I will just live with a Dashboard view. 

DerekLaw
Esri Esteemed Contributor

That's a gorgeous ArcGIS Dashboard @TarigAhmedTXHSDS  - thanks for sharing!!

DerekLaw
Esri Esteemed Contributor

Hi @TarigAhmedTXHSDS,

How can I create an alert for ArcGIS Enterprise (Portal and/or Server) license expiration alert e.g 30 days? 

Unfortunately, it is not possible to configure this type of alert in ArcGIS Monitor at this time. We do have this feature enhancement in the Dev backlog. I will add your name to the list of users asking for this.

Hope this helps and that things are good on your end,

TarigAhmedTXHSDS
Occasional Contributor

Hi Derek,

Glad to hear that, can't wait to add this Alert in ArcGIS Monitor. 

rcGIS
by
Frequent Contributor

Hello @TarigAhmedTXHSDS, just as a side note, and not an ArcGIS Monitor functionality, but an available capability in Portal for ArcGIS is to configure the email settings to get an automatic email notification when licenses in your organization are about to expire. I confirm those emails are sent for Portal for ArcGIS licenses, user types, and add-on licenses*.

This is available since ArcGIS Enterprise 10.8.1: https://www.esri.com/arcgis-blog/products/arcgis-enterprise/administration/whats-new-in-arcgis-enter...

*I couldn't verify yet if you also get notified for ArcGIS Server license expiration (ours is a permanent one).

TarigAhmedTXHSDS
Occasional Contributor

Thank you rcGIS. I was hoping for a built functionality in ArcGIS Monitor.

0 Kudos