Forum Discussion

Stig_hj's avatar
Stig_hj
Copper Contributor
Jul 17, 2020
Solved

How to extract Common name from Distinguished Name in Kusto Query

Hi Anyone have a Solution on how to extract Common name from Distinguished Name In Kusto I have tried parse, split, Sub string and what ever, but haven´t have a success with VB and Power Shell it is...
  • CliveWatson's avatar
    Jul 17, 2020

    Stig_hj 

     

    Here are two ways, I prefer Parse to split in this case:

    let MemberTable = datatable (cn:string)
    [
    "CN=test test, OU=something, OU=Something, OU=Something"
    ];
    MemberTable
    | parse cn with * "CN=" strcnName "," *
    | project split(split(cn,",").[0],"=").[1] , strcnName

     

Resources