Software Asset Management Filtering Applications Coming From Microsoft Entra ID
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 07:53 PM - edited 08-07-2024 08:42 PM
Hi Everyone,
I am currently working on a project to implement Software Asset Management for an instance, and we are using the Microsoft Entra ID (previously Azure AD) spoke to connect SSO applications and groups, and bring them into the instance. There is an OOB functionality for this, however, the Entra ID account has all of the company's global applications, and we want to filter this to only bring in applications relevant to our country (these applications all start with NZ, which is what I have been trying to build the filter around). Unfortunately, I am unsure where in the script the GET request is actually sent, and I do not know where to apply the filter. There are many scripts related to the " SAM SSO Scheduled Script Execution", I think I have nailed it down to somewhere in the "downloadApplicationsFullPull" function in the SAMSSOIntegration script include, but I could be completely wrong as what I am trying currently is not working, i.e. when I run the script executor, nothing is being pulled across anymore. In the AMELIA TESTING block comment below.
SAMSSOIntegration.downloadApplicationsFullPull = function downloadApplicationsFullPull(profile) {
var startTime = new GlideDateTime();
startTime.add(-60000);
var appSysId = null;
var smSysId = null;
var appExternalId = null;
var success = false;
try {
var input;
if (profile.getValue('profile_type') === 'microsoft_azure_ad') {
input = {
integration_profile: profile,
/* AMELIA TESTING THIS SECTION*/
filter: 'startswith(displayName, "NZ")',
/* TEST OVER*/
};
} else if (profile.getValue('profile_type') === 'okta') {
input = {
integration_profile: profile,
filter: 'status eq "ACTIVE"',
};
}
I based the filter structure on what I could find in Microsoft Graph API documentation but I could be well wrong.
Has anyone faced a similar issue or have any ideas for a solution?
