Question

Access to more than one model with Embed SSO Login

  • 14 February 2018
  • 1 reply
  • 201 views

I’m trying to improve our access to Looker via the Embed SSO Login, so that it can support access to multiple models, from the same embed user. Our code so far is based on the example SSO Login PHP script in the Looker Codebase;




The example passes a bunch of attributes to the API to determine how the embed user will be set-up, including;



  • nonce

  • time

  • session_length

  • external_user_id

  • permissions

  • models

  • group_ids

  • etc…


Presently, our SSO Login only permits access to a single model. This is causing us problems for dashboard scheduling, when after switching models, the embed model permissions are overwritten, causing errors when sending out scheduled dashboards for the previous model.


If I need the login to have access to multiple client models how should I be configuring this? Is it enough to specify multiple model names in the ‘models’ attribute?


Many thanks!


1 reply

Hi Rob,


This should be an easy fix, you can add as many model names as is required in the $json_models = json_encode( array ( “<your_model_name>” ) ); parameter.


You can test this out using this tool, which I used to generate the following URI:


https://learn.looker.com/login/embed/%2Fembed%2Flooks%2F1?
nonce=%22HfUwV3iFe1rvPhvW%22
&time=1518624558
&session_length=600
&external_user_id=%22test-id-123%22
&permissions=%5B%22access_data%22%2C%22see_looks%22%5D

&models=%5B%22model1%22%2C%22model2%22%5D

&group_ids=%5B%5D&external_group_id=%22%22
&user_attributes=%7B%7D
&access_filters=%7B%7D
&first_name=%22Testy%22
&last_name=%22McTestFace%22
&force_logout_login=true
&signature=4fXh9aUrLbNmaL432B9djVV7HPY%3D

Notice the model section of the URI has many models listed.


Have a look at the tool and let me know if you have any feedback.

Reply