Hi All,
How can I create an alert for ArcGIS Enterprise (Portal and/or Server) license expiration alert e.g 30 days?
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.
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:
Authenticates with admin credentials.
Fetches license details.
Compares today’s date with expiration date.
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()
Thank you VenkataKondepati. I was hoping for a built functionality in ArcGIS Monitor.
For now, I will just live with a Dashboard view.
That's a gorgeous ArcGIS Dashboard @TarigAhmedTXHSDS - thanks for sharing!!
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,
Hi Derek,
Glad to hear that, can't wait to add this Alert in ArcGIS Monitor.
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).
Thank you rcGIS. I was hoping for a built functionality in ArcGIS Monitor.