Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

How we can import the array object in a Azure Account Import

mollasiraj
Regular Contributor
Regular Contributor

Hi All,

Below is the account import json that we are using-

{
"acctLabels": {
"customproperty1": "FirstName",
"customproperty2": "LastName",
"customproperty3": "OfficePhone",
"customproperty4": "Email",
"customproperty5": "MailNickName",
"customproperty10": "AccountStatus",
"customproperty20": "EmployeeID",
"customproperty6":"customproperty6",
},
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "userPrincipalName~#~char",
"displayName": "displayName~#~char",
"customproperty1": "givenName~#~char",
"customproperty2": "surname~#~char",
"customproperty3": "businessPhone~#~char",
"customproperty4": "mail~#~char",
"customproperty5": "mailNickname~#~char",
"customproperty10": "accountEnabled~#~char",
"customproperty20": "employeeId~#~char",
"customproperty6":"manager~#~char",

}
}

but for achieving another usecase we have to import the lastSignInDateTime value into cp7.Below is the new json that we are using for importing lastSignInDateTime-

{
"acctLabels": {
"customproperty1": "FirstName",
"customproperty2": "LastName",
"customproperty3": "OfficePhone",
"customproperty4": "Email",
"customproperty5": "MailNickName",
"customproperty10": "AccountStatus",
"customproperty20": "EmployeeID",
"customproperty6":"customproperty6",
"customproperty7":"lastSignInDateTime"
},
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "userPrincipalName~#~char",
"displayName": "displayName~#~char",
"customproperty1": "givenName~#~char",
"customproperty2": "surname~#~char",
"customproperty3": "businessPhone~#~char",
"customproperty4": "mail~#~char",
"customproperty5": "mailNickname~#~char",
"customproperty10": "accountEnabled~#~char",
"customproperty20": "employeeId~#~char",
"customproperty6":"manager~#~char",
"customproperty7":"signInActivity[0]~#~char"

}
}

Below is the postman response

{
            "displayName""xx",
            "id""xx-xx-xx-xx-xx",
            "signInActivity": {
                "lastSignInDateTime": "2023-03-22T16:30:19Z",
                "lastSignInRequestId""xx",
                "lastNonInteractiveSignInDateTime""2023-03-20T15:58:50Z",
                "lastNonInteractiveSignInRequestId""xx"
            }
        }
 
Please let me know how we can import the lastSignInDateTime  from the signInActivity array.
 
With Regards,
Siraj Molla
12 REPLIES 12

SB
Saviynt Employee
Saviynt Employee

I believe lastSignInDateTime is only available in the Graph beta api as of now and you will not be able to import it using the OOB AAD connector. To fetch this attribute, you may want to use the Beta Graph API in a REST connector. 


Regards,
Sahil

mollasiraj
Regular Contributor
Regular Contributor

Hi Sahil,

I created a Rest connector for importing lastSignInDateTime but job is showing success  not importing anything below is the json that I am using-

{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://graph.microsoft.com/v1.0/users",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "users",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "Id~#~char",
"name": "userPrincipalName~#~char",
"displayName": "Name~#~char",
"customproperty2": "LastName~#~char",
"customproperty1": "FirstName~#~char",
"customproperty3": "employeeId~#~char",
"status": "accountEnabled~#~char",
"customproperty4": "signInActivity.lastSignInDateTime[0]~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings": {},
"entitlementParams": {},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}
}

Please let me know how this issue can be fix.

With Regards,

Siraj Molla

SB
Saviynt Employee
Saviynt Employee

Can you confirm if you are getting a valid response from postman.

Also, please update ConfigJSON param in the REST connection with value {"showLogs":true} if not done already. Run the import job and check for the below string in the logs to check if you see the data in Saviynt.

Calling Webservice Url

Got Webservice API Response


Regards,
Sahil

mollasiraj
Regular Contributor
Regular Contributor

Hi Sahil,

Below URL I am using in postman and getting response-

GET Method

URL-

https://graph.microsoft.com/v1.0/users?$select=displayName,signInActivity,userPrincipalName,employee...

Please let me know how this issue can bed fixed.

With Regards,

Siraj Molla

SB
Saviynt Employee
Saviynt Employee

Did you update ConfigJSON param in the REST connection with value {"showLogs":true}. Also, please run the import job and check for the below string in the logs to check if you see the data in Saviynt.

Calling Webservice Url

Got Webservice API Response


Regards,
Sahil

mollasiraj
Regular Contributor
Regular Contributor

Hi Sahil,

I am using below json and also I check the log I see it is fetching data from azure but getting error to import-

mollasiraj_0-1683615452743.png

 

{
"showLogs": true,
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"successResponses": {
"statusCode": [
200,
201
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
404,
405,
500
]
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://graph.microsoft.com/v1.0/users?$select=displayName,signInActivity,userPrincipalName,employee...",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"keyField": "name",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"acctLabels": {
"customproperty1": "FirstName"
},
"colsToPropsMap": {
"accountID": "Id~#~char",
"name": "userPrincipalName~#~char",
"displayName": "Name~#~char",
"customproperty2": "LastName~#~char",
"customproperty1": "FirstName~#~char",
"customproperty3": "employeeId~#~char",
"customproperty4": "signInActivity.lastSignInDateTime~#~char",
"status": "accountEnabled~#~char"
}
}
}
},
"userResponsePath": "value",
"pagination": {
"nextUrl": {
"nextUrlPath": "${(response?.completeResponseMap?.get('@odata.nextLink')==null)? null : response?.completeResponseMap?.get('@odata.nextLink')}"
}
},
"entitlementParams": {},
"acctEntParams": {}
}

Please let me know how this issue can be fixed.

 

With Regards,

Siraj Molla

SB
Saviynt Employee
Saviynt Employee

Does the job status show as fail in Job control panel.

Do you see any error in the logs for the job.


Regards,
Sahil

mollasiraj
Regular Contributor
Regular Contributor

Hi Sahil,

I am using the below json for import It's working now but It's not importing all the record from Azure Active Directory it's only importing 100 record in saviynt.

{
"showLogs": true,
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"successResponses": {
"statusCode": [
200,
201
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
404,
405,
500
]
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://graph.microsoft.com/v1.0/users?$select=displayName,signInActivity,userPrincipalName,employee...",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "value",
"keyField": "accountID",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"acctLabels": {
"customproperty1": "FirstName"
},
"colsToPropsMap": {
"accountID": "Id~#~char",
"name": "userPrincipalName~#~char",
"displayName": "Name~#~char",
"customproperty3": "employeeId~#~char",
"customproperty4": "signInActivity.lastSignInDateTime~#~char",
"status": "accountEnabled~#~char"
}
}
}
},
"userResponsePath": "value",
"pagination": {
"nextUrl": {
"nextUrlPath": "${(response?.completeResponseMap?.get('@odata.nextLink')==null)? null : response?.completeResponseMap?.get('@odata.nextLink').replace('%2c',',')}"
}
},
"entitlementParams": {},
"acctEntParams": {}
}

Please let me know if anything needs to add in pagination or in json for import all the record.

With Regards,

Siraj Molla

SB
Saviynt Employee
Saviynt Employee

what do you see in the logs for the pagination url. Can you verify if the next url to be run based on pagination configured is being read as it should and being called.


Regards,
Sahil

mollasiraj
Regular Contributor
Regular Contributor

Hi Sahil,

Below is the json that I am using -

{
  "accountParams": {
    "connection": "acctAuth",
    "processingType": "SequentialAndIterative",   
    "call": {
      "call1": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "httpHeaders": {
            "Authorization": "${access_token}",
            "Accept": "application/json"
          },
          "httpContentType": "application/json",
          "httpMethod": "GET"
        },
        "listField": "value",
        "keyField": "accountID",     
        "colsToPropsMap": {
          "accountID": "id~#~char",
          "name": "userPrincipalName~#~char",
          "displayName": "displayName~#~char",
          "customproperty3": "employeeId~#~char",
  "customproperty4": "signInActivity.lastSignInDateTime~#~char",
  "status": "accountEnabled~#~char"   
        },
"pagination": {
          "nextUrl": {
"nextUrlPath": "${(response?.completeResponseMap?.get('@odata.nextLink')==null)? null : response?.completeResponseMap?.get('@odata.nextLink').replace('%2c',',')}"            
          }
        }
      }
    }
  },
  "entitlementParams": {},
  "acctEntParams": {}
}
The above json is working fine and it resolve the issue and here we  are using Application Data Import (Multi Threaded) as a job type.
 
With Regards,
Siraj Molla

SB
Saviynt Employee
Saviynt Employee

Just to be certain, is the issue resolved now.


Regards,
Sahil

mollasiraj
Regular Contributor
Regular Contributor

Hi Sahil,

I did reformatting of the json and create a Application Data Import (Multi Threaded) as a job type now signinActivity is working fine.

With Regards,

Siraj Molla