Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Profile column to okta_app_assigned_group. Closes #57 #58

Merged
merged 1 commit into from
Jan 20, 2022
Merged

Conversation

c0d3r-arnab
Copy link
Contributor

@c0d3r-arnab c0d3r-arnab commented Jan 18, 2022

Example query results

Results
> select
  grp.name as name,
  grp.description as description,
  jsonb_pretty(grp.group_members) as group_members
from
  okta_group grp
full outer join okta_app_assigned_group ag on grp.id = ag.id
where
  grp.id is null or ag.id is null;
+-----------+--------------------------------+----------------------------------------+
| name      | description                    | group_members                          |
+-----------+--------------------------------+----------------------------------------+
| Everyone  | All users in your organization | [                                      |
|           |                                |     {                                  |
|           |                                |         "id": "00u1kcigdvWtR96HY5d7",  |
|           |                                |         "email": "arnab@turbot.com",   |
|           |                                |         "login": "arnab@turbot.com"    |
|           |                                |     },                                 |
|           |                                |     {                                  |
|           |                                |         "id": "00u33m8oarePFyaTm5d7",  |
|           |                                |         "email": "arnabg57@gmail.com", |
|           |                                |         "login": "arnabg57@gmail.com"  |
|           |                                |     },                                 |
|           |                                |     {                                  |
|           |                                |         "id": "00u3e9oo5e7hR6X815d7",  |
|           |                                |         "email": "testUser@gmail.com", |
|           |                                |         "login": "testUser@gmail.com"  |
|           |                                |     }                                  |
|           |                                | ]                                      |
| TestGroup | This is a test group           | [                                      |
|           |                                |     {                                  |
|           |                                |         "id": "00u33m8oarePFyaTm5d7",  |
|           |                                |         "email": "arnabg57@gmail.com", |
|           |                                |         "login": "arnabg57@gmail.com"  |
|           |                                |     }                                  |
|           |                                | ]                                      |
+-----------+--------------------------------+----------------------------------------+
> select
  app.name as app_name,
  app.id as app_id,
  app.created as app_created,
  app.status as app_status,
  ag.id as group_id,
  grp.name as group_name,
  grp.description as group_description,
  jsonb_pretty(grp.group_members) as group_members
from
  okta_application app
left join okta_app_assigned_group ag on app.id = ag.app_id
left join okta_group grp on ag.id = grp.id;
+---------------------+----------------------+---------------------------+------------+----------------------+---------------+-----------------------+----------------------------------------+
| app_name            | app_id               | app_created               | app_status | group_id             | group_name    | group_description     | group_members                          |
+---------------------+----------------------+---------------------------+------------+----------------------+---------------+-----------------------+----------------------------------------+
| okta_enduser        | 0oa1kchdrfcXTbEzV5d7 | 2021-08-26T09:56:36+05:30 | ACTIVE     | <null>               | <null>        | <null>                | <null>                                 |
| oidc_client         | 0oa1mf49z9iZurdzA5d7 | 2021-08-31T18:01:44+05:30 | ACTIVE     | <null>               | <null>        | <null>                | <null>                                 |
| okta_browser_plugin | 0oa1kcigd9Kob07k05d7 | 2021-08-26T09:56:36+05:30 | ACTIVE     | <null>               | <null>        | <null>                | <null>                                 |
| saasure             | 0oa1kchdmerpZir9y5d7 | 2021-08-26T09:56:28+05:30 | ACTIVE     | <null>               | <null>        | <null>                | <null>                                 |
| oidc_client         | 0oa1mf9l3dw26foa25d7 | 2021-08-31T18:16:30+05:30 | ACTIVE     | 00g3e9b6esCUiHSkK5d7 | Another Group | This is another group | [                                      |
|                     |                      |                           |            |                      |               |                       |     {                                  |
|                     |                      |                           |            |                      |               |                       |         "id": "00u33m8oarePFyaTm5d7",  |
|                     |                      |                           |            |                      |               |                       |         "email": "arnabg57@gmail.com", |
|                     |                      |                           |            |                      |               |                       |         "login": "arnabg57@gmail.com"  |
|                     |                      |                           |            |                      |               |                       |     }                                  |
|                     |                      |                           |            |                      |               |                       | ]                                      |
+---------------------+----------------------+---------------------------+------------+----------------------+---------------+-----------------------+----------------------------------------+
> select
  id as group_id,
  app_id,
  last_updated,
  priority
from
  okta_app_assigned_group;
+----------------------+----------------------+---------------------------+----------+
| group_id             | app_id               | last_updated              | priority |
+----------------------+----------------------+---------------------------+----------+
| 00g3e9b6esCUiHSkK5d7 | 0oa1mf9l3dw26foa25d7 | 2022-01-17T13:21:17+05:30 | 1        |
+----------------------+----------------------+---------------------------+----------+

@misraved misraved merged commit 47d655f into main Jan 20, 2022
@misraved misraved deleted the issue-57 branch January 20, 2022 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

profile data not available in okta_application table
2 participants