Sailpoint x PowerBI API

Hello, I would like to know how I could transfer some attribute information to powerbi? I need to get two fields from the SailPoint API and pull them through Power BI.

I saw that this process exists, but it is not bringing it.

I need to bring this information:

{
“indexes”: [
“identities”
],
“query”: {
“query”: “attributes.cloudLifecycleState:holidays”

},
“includeNested”: true ,
“queryResultFilter”: {
“includes”: [
“*”

]
}

}

Hi @kaiolima,

I suggest to use Adanced Power Query script :

Here the content of script :

let
    url = "https://dummyjson.com/posts/add",
    headers = [#"Content-Type"="application/json"],
    body =  "{ ""title"": ""Test title"",  ""userId"": 5 }",
   response = Json.Document(Web.Contents(url,
        [
            Headers = headers,
            Content = Text.ToBinary((body))
        ]))
in
 response

And template isc/idn :

let
    url = "https://tenant.api.identitynow.com/v3/search",
    headers = [#"Content-Type"="application/json",Authorization="Bearer yourAccessToken"],
    body =   "{ ""indexes"": [""identities""], ""query"": { ""query"": ""attributes.cloudLifecycleState:holidays"" }, ""includeNested"": false, ""queryResultFilter"": { ""includes"": [""*""] } }",
   response = Json.Document(Web.Contents(url,
        [
            Headers = headers,
            Content = Text.ToBinary((body))
        ]))
in
 response

Replace yourAccessToken with your access token.

Be review your search query if it’s what you really want.

1 Like

Hi @kaiolima

Yes, agree with @baoussounda , you will need to use the powerQuery code to make it possible.

You need to do as below

  1. Retrieve the access token by giving your using client credentials using the PAT.
  2. Then you need to make another POST API call to call the search API. Personally, i use the report extraction APIs because with search API, we need to add the pagination logic (which is possible) but powerBI does give the issues when the identities exceeds more than 10K. So in that case, it is better to use report extraction API.

In addition to that there was also a very nice demo presented during 2024 developer days. You can check out the amazing session

I hope this helps. If you need more information, please let me know, happy to help.

Thank You.
Regards
Vikas.

1 Like

Thank you, it worked here.

It just appears in a strange way, you have to click on each “record”

I think because each entry is object.
Try this :

 url = "https://tenant.api.identitynow.com/v3/search",
    headers = [#"Content-Type"="application/json",Authorization="Bearer yourAccessToken"],
    body =   "{ ""indexes"": [""identities""], ""query"": { ""query"": ""attributes.cloudLifecycleState:holidays"" }, ""includeNested"": false, ""queryResultFilter"": { ""includes"": [""*""] } }",
   response = Json.Document(Web.Contents(url,
        [
            Headers = headers,
            Content = Text.ToBinary((body))
        ]))

  // Convert the list of records into a table
    itemsTable = Table.FromList(response, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    
    // Expand the records into columns
    expandedItems = Table.ExpandRecordColumn(itemsTable, "Column1", Record.FieldNames(response{0}))
in
    expandedItem
1 Like

There is an error in the itemTable

@kaiolima i update it :

url = "https://tenant.api.identitynow.com/v3/search",
    headers = [#"Content-Type"="application/json",Authorization="Bearer yourAccessToken"],
    body =   "{ ""indexes"": [""identities""], ""query"": { ""query"": ""attributes.cloudLifecycleState:holidays"" }, ""includeNested"": false, ""queryResultFilter"": { ""includes"": [""*""] } }",
   response = Json.Document(Web.Contents(url,
        [
            Headers = headers,
            Content = Text.ToBinary((body))
        ])),

  // Convert the list of records into a table
    itemsTable = Table.FromList(response, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    
    // Expand the records into columns
    expandedItems = Table.ExpandRecordColumn(itemsTable, "Column1", Record.FieldNames(response{0}))
in
    expandedItems
1 Like

It works now, thank you!

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.