(ast_license_msft) table in ServiceNow Asset

Manisha Yadav
Tera Contributor

How this Microsoft License table populates and how it is linked with Asset.

1 ACCEPTED SOLUTION

Shivalika
Mega Sage

Hello @Manisha Yadav 

 

The ast_license_msft (Microsoft License) table in ServiceNow is populated through IT Asset Management (ITAM), specifically via Software Asset Management (SAM) when integrating with Microsoft licensing data sources. 

 

We have both Azure AD and Microsoft SCCM Integration  - 

 

Integration with Microsoft SCCM or Azure AD

ServiceNow integrates with Microsoft SCCM (System Center Configuration Manager) or Azure AD to pull in license data.

 

The integration syncs installed software, license entitlements, and usage data into ServiceNow, which then updates ast_license_msft.

 

Data is fetched using MID Server for on-prem SCCM or directly via API for Azure AD.

 

ServiceNow Discovery & SAM Pro

Discovery & Software Asset Management Professional (SAM Pro) automatically detect Microsoft software installs.

 

The detected installations are matched with license entitlements, updating ast_license_msft.

 

Normalization rules in SAM ensure correct publisher, product, and version details.

 

Also, obviously if there is any scheduled imports on the table. 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

View solution in original post

6 REPLIES 6

Manisha Yadav
Tera Contributor

Also, when it is populated (either manually or by some other approach)

Will it calculate Install counts and other related field automatically?

So that Software licenses can be tracked in this table.

Hello @Manisha Yadav 

 

If You have SAM Pro (Software Asset Management Professional)

  • SAM Pro uses Discovery or SCCM data to track installed software.

  • The Software Installation (cmdb_sam_sw_install) table stores installations.

  • It automatically links installations to software licenses, updating install counts and compliance.

 

If you don't have it, you may need to use below 👇 script in scheduled job - 

 

var licenseGR = new GlideRecord('alm_license');

licenseGR.query();

while (licenseGR.next()) {

    var softwareName = licenseGR.software;

    

    var installCountGR = new GlideAggregate('cmdb_sam_sw_install');

    installCountGR.addQuery('software', softwareName);

    installCountGR.addAggregate('COUNT');

    installCountGR.query();

    

    if (installCountGR.next()) {

        licenseGR.installed_count = installCountGR.getAggregate('COUNT'); // Update install count

        licenseGR.update();

    }

}

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY