This message was deleted.
# citrix-cloud
s
This message was deleted.
r
s
Thanks, great article. I just tried and getting an error. I am a full admin so its weird I would get denied access. Error: [Access denied to query Monitor objects : Customer header is unavailable.] Invoke-WebRequest : Access denied to query Monitor objects : Customer header is unavailable. I used the interactive login both with my customer url and citrix id Update: API seems to have worked.
r
Whcih script are you using
s
that was all sessions. i got it to work with the api. Now im taking bits from last logon and combing them to see if i can get clientname and clientip. so far they are just returning blank entries so I probably don't have a variable set right
r
I htink those are in connections so you would need to add the connections table in an expand
s
yes, then i had to set variable to $r.connections.clientaddress for example. Its working mostly, some records are returning SystemObject instead of the client name or ip. was going to dig into that a little
r
thsi is whats available in the connections table : {@{Id=2860; ClientName=WR_Yu0Q6Sk8cLAL; ClientAddress=192.168.0.84; ClientVersion=; ClientPlatform=; ConnectedViaHostName=; ConnectedViaIPAddress=; LaunchedViaHostName=; LaunchedViaIPAddress=; IsReconnect=False; IsSecureIca=False; Protocol=; LogOnStartDate=2023-07-06T204304.6Z; LogOnEndDate=2023-07-06T204622.663Z; BrokeringDuration=; BrokeringDate=2023-07-06T204622.663Z; DisconnectCode=; DisconnectDate=; VMStartStartDate=; VMStartEndDate=; ClientSessionValidateDate=; ServerSessionValidateDate=; EstablishmentDate=; HdxStartDate=; HdxEndDate=; AuthenticationDuration=; GpoStartDate=; GpoEndDate=; LogOnScriptsStartDate=; LogOnScriptsEndDate=; ProfileLoadStartDate=; ProfileLoadEndDate=; InteractiveStartDate=; InteractiveEndDate=; SessionKey=b75e8c2b-19ab-4796-9838-00d9a8cf896c; CreatedDate=2023-07-06T204622.663Z; ModifiedDate=2023-07-06T204630.167Z}}
s
sorry to bother but do you know what i would do to get the delivery group name
r
depends which api your starting wiht. If its sessions you need to expand to machines first &`$expand=Machine(`$select=DesktopGroupId)" Then you would have to expand to desktopgroup but that's hard. What i do is first get all the desktop groups and create a hash with desktopgroupid as the key and name as the value then i just look it up.
s
Im getting the SystemObject[] message when the client name/ip contains what looks like multiple entries, not sure how that happens lol ClientName : {WR_txfQEskjC2hF3TtQ4, WPWFSPXX} ClientAddress : {128.224.12.245, 108.25.112.2}
wonder if that was a session reconnect