Giter VIP home page Giter VIP logo

Comments (13)

MBeKde avatar MBeKde commented on June 4, 2024 1

I confirm, that using filter this will result in an (400) Bad Request error.
Seems that it is a QRS Problem and not based on Qlik-Cli.
I would try to get more information about that very strange behavior.
For the moment, you could try to catch all data (/full) and than loop through till you find the one your are looking for ...

from qlik-cli-windows.

ahaydon avatar ahaydon commented on June 4, 2024 1

@itibook you can use the -Verbose switch with the connect command, it will display either the username or that it is using default credentials which means logged on user.

from qlik-cli-windows.

ahaydon avatar ahaydon commented on June 4, 2024

Do you have a token based license and rights to view user access types, e.g. RootAdmin?

from qlik-cli-windows.

MBeKde avatar MBeKde commented on June 4, 2024

I checked Get_QlikUSerAccessType in our environment and it works fine! Token Based License and i run local with account which has RootAdmin role.

from qlik-cli-windows.

itibook avatar itibook commented on June 4, 2024

@initit

do you have a sample script? Maybe I am probably doing something really silly... yes running RootAdmin user.

When I run

Get-QlikUser -filter "userid eq 'test@test'"

I get the right output

When I run

Get-QlikUserAccessType -filter "id eq 'id-from-license-panel-tab-in-qmc'"

I get a 400 error

Invoke-RestMethod : The remote server returned an error: (400) Bad Request.

thanks in advance with whatever help you can provide.

from qlik-cli-windows.

ahaydon avatar ahaydon commented on June 4, 2024

You don't need single quotes around an ID, try using the following instead.

Get-QlikUserAccessType -filter "id eq id-from-license-panel-tab-in-qmc"

Also, you don't need to use filters when you know the ID, just provide it after the command.

Get-QlikUserAccessType id-from-license-panel-tab-in-qmc

from qlik-cli-windows.

itibook avatar itibook commented on June 4, 2024

@ahaydon thanks for the tips, but not getting any luck...

when I try the first option you proposed I don't get any output, the second one gives me a 404 error.

I am on QlikSense Server June 2019 Edition

from qlik-cli-windows.

MBeKde avatar MBeKde commented on June 4, 2024

Hi @itibook,
did some more testing.
As @ahaydon suggested, you have to pay attention about formatting the filter.

These commands runs with success:

Get-QlikUserAccessType -filter "modifiedbyusername so 'test'" -full
Get-QlikUserAccessType -filter "user.id eq ab5fce20-c5f5-4cf4-b4f3-1d80b2ac640b" -full
Get-QlikUserAccessType -filter "id eq e4709a78-9b24-4ba5-be05-8246ee65d53c" -full

So, searching the id (GUID) do not use '
Searching a text (like username) use '
Also, it seem that you could filter an id only with the "eq" operator
filtering textes, you could use "sw", "so" "eq" ...

My Server is Qlik Sense November 2018 Patch 1 (12.44.2)

from qlik-cli-windows.

itibook avatar itibook commented on June 4, 2024

Hi @initit,

Some more digging... :-)

running a filter on userid for the QlikUser command WITHOUT single quotes gives me a 400 error

$user = Get-QlikUser -filter "userid eq user1" -full

running a filter on userid for QlikUser command WITH single quotes gives me the good result

$user = Get-QlikUser -filter "userid eq 'user1'" -full

when running a similar request on the Get-QlikUserAccessType as you suggested I get a 400 error WITH single quotes, and no data WITHOUT single quotes...

Not quite sure anymore what I could check now... 😕

from qlik-cli-windows.

ahaydon avatar ahaydon commented on June 4, 2024

@itibook, you need to wrap strings in single quotes, but UUIDs are not strings and should not have single quotes.

The userId property of a user is a string and so requires single quotes, but id is a UUID so does not.

With the Get-QlikUserAccessType you are querying user access passes which have a user property containing the user object associated with the access pass, so id is a UUID, user.id is also a UUID, but user.userId is a string.

If you're getting no data and no error then the request is succeeding and returning all the objects that you have access to.

How are you authenticating?

If you are providing the username parameter to the connect command and expecting to be authenticated as that user then you need to be supplying a certificate to authenticate, otherwise you will be authenticated as the account running the powershell console.

from qlik-cli-windows.

itibook avatar itibook commented on June 4, 2024

@ahaydon ah ok thanks...

the authentication part was not clear... must be that then thanks again for all the tips and help in troubleshooting, very much appreciated!

from qlik-cli-windows.

ahaydon avatar ahaydon commented on June 4, 2024

@ahaydon ah ok thanks...

the authentication part was not clear... must be that then thanks again for all the tips and help in troubleshooting, very much appreciated!

I completely agree, it should not be possible to provide an invalid parameter, I will fix this.

from qlik-cli-windows.

itibook avatar itibook commented on June 4, 2024

@ahaydon

btw, is there a way to check what user is being authenticated via the PS script?

because with the Connect command I am using, I can upload and publish apps. So quite curious to know what user I am being authenticated if it's not the one I supplied via the Connect command...

from qlik-cli-windows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.