Skip to content

sso

sso

add_note_to_user_direct_signon async

add_note_to_user_direct_signon(
    auth: DomoAuth,
    user_id_ls: list[str],
    note: str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> ResponseGetData

Endpoint

  • POST /content/v3/users/directSignOn/note

Called by

Source code in src/crew_dcs/routes/instance_config/sso.py
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def add_note_to_user_direct_signon(
    auth: dmda.DomoAuth,
    user_id_ls: list[str],
    note: str,  # add a note to the sso entry
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    user_id_ls = user_id_ls if isinstance(user_id_ls, list) else [user_id_ls]

    if note:
        url = f"https://{auth.domo_instance}.domo.com/api/content/v3/users/directSignOn/note"
        res = await gd.get_data(
            auth=auth,
            url=url,
            params={"note": quote_plus(note)},
            method="POST",
            body=user_id_ls,
            context=context,
        )

    if return_raw:
        return res

    if not res.is_success:
        raise SSO_AddUserDirectSignonError(res=res, user_id_ls=user_id_ls)

    res.response = f"successfully amended note for {', '.join(user_id_ls)} in direct signon list in {auth.domo_instance}"

    return res

get_sso_oidc_config async

get_sso_oidc_config(
    auth: DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
)

Open ID Connect framework

Endpoint

  • GET /identity/v1/authentication/oidc/std/settings

Called by

Source code in src/crew_dcs/routes/instance_config/sso.py
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_sso_oidc_config(
    auth: dmda.DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Open ID Connect framework"""

    url = f"https://{auth.domo_instance}.domo.com/api/identity/v1/authentication/oidc/std/settings"

    res = await gd.get_data(
        auth=auth,
        url=url,
        method="GET",
        context=context,
    )

    if not res.is_success:
        raise SSO_GET_Error(res=res)

    return res

get_sso_saml_certificate async

get_sso_saml_certificate(
    auth: DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
)

Calls route

Source code in src/crew_dcs/routes/instance_config/sso.py
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_sso_saml_certificate(
    auth: dmda.DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    res = await get_sso_saml_config(
        auth=auth,
        context=context,
    )

    res.response = res.response.get("idpCertificate")

    return res

get_sso_saml_config async

get_sso_saml_config(
    auth: DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
)

Security Assertion Markup Language

Endpoint

  • GET /identity/v1/authentication/saml/std/settings

Called by

Source code in src/crew_dcs/routes/instance_config/sso.py
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_sso_saml_config(
    auth: dmda.DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Security Assertion Markup Language"""

    url = f"https://{auth.domo_instance}.domo.com/api/identity/v1/authentication/saml/std/settings"

    res = await gd.get_data(
        auth=auth,
        url=url,
        method="GET",
        context=context,
    )

    if not res.is_success:
        raise SSO_GET_Error(res=res)

    return res

set_sso_certificate async

set_sso_certificate(
    auth: DomoAuth,
    idp_certificate: str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
)

Endpoint

  • PUT /identity/v1/authentication/saml/validate/cert
Source code in src/crew_dcs/routes/instance_config/sso.py
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def set_sso_certificate(
    auth: dmda.DomoAuth,
    idp_certificate: str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    url = f"https://{auth.domo_instance}.domo.com/api/identity/v1/authentication/saml/validate/cert"

    res = await gd.get_data(
        auth=auth,
        url=url,
        method="PUT",
        body={"idpCertificate": idp_certificate},
        context=context,
    )

    if return_raw:
        return res

    if not res.is_success:
        raise SSO_CRUD_Error(res=res, message=f"API Error {res.response}")

    if isinstance(res.response, dict) and not res.response["isValid"]:
        raise SSO_CRUD_Error(
            res=res, message=f"Certificate Error: {res.response['message']}"
        )

    return res

toggle_sso_custom_attributes async

toggle_sso_custom_attributes(
    auth: DomoAuth,
    is_custom_attributes: bool,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
)

unsure what this API does

Endpoint

  • PUT /customer/v1/properties/authentication.saml.custom_attributes
Source code in src/crew_dcs/routes/instance_config/sso.py
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def toggle_sso_custom_attributes(
    auth: dmda.DomoAuth,
    is_custom_attributes: bool,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """unsure what this API does"""

    url = f"https://{auth.domo_instance}.domo.com/api/customer/v1/properties/authentication.saml.custom_attributes"

    res = await gd.get_data(
        auth=auth,
        url=url,
        method="PUT",
        body={"value": is_custom_attributes},
        context=context,
    )

    if not res.is_success:
        raise SSO_CRUD_Error(res=res)

    res.response = f"toggled is_custom_attributes - {is_custom_attributes!s}"

    return res

toggle_sso_skip_to_idp async

toggle_sso_skip_to_idp(
    auth: DomoAuth,
    is_skip_to_idp: bool,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
)

Endpoint

  • PUT /customer/v1/properties/domo.policy.sso.skip_to_idp
Source code in src/crew_dcs/routes/instance_config/sso.py
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def toggle_sso_skip_to_idp(
    auth: dmda.DomoAuth,
    is_skip_to_idp: bool,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    url = f"https://{auth.domo_instance}.domo.com/api/customer/v1/properties/domo.policy.sso.skip_to_idp"

    res = await gd.get_data(
        auth=auth,
        url=url,
        method="PUT",
        body={"value": str(is_skip_to_idp).lower()},
        context=context,
    )

    if not res.is_success:
        raise SSO_CRUD_Error(res=res)

    res.response = f"toggled skip_to_idp - {is_skip_to_idp!s}"
    return res

toggle_user_direct_signon_access async

toggle_user_direct_signon_access(
    auth: DomoAuth,
    user_id_ls: list[str],
    is_enable_direct_signon: bool,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> ResponseGetData

Endpoint

  • POST /content/v3/users/directSignOn

Called by

Source code in src/crew_dcs/routes/instance_config/sso.py
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def toggle_user_direct_signon_access(
    auth: dmda.DomoAuth,
    user_id_ls: list[str],
    is_enable_direct_signon: bool,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    user_id_ls = user_id_ls if isinstance(user_id_ls, list) else [user_id_ls]

    user_id_ls = [int(user_id) for user_id in user_id_ls]

    url = f"https://{auth.domo_instance}.domo.com/api/content/v3/users/directSignOn"

    res = await gd.get_data(
        auth=auth,
        url=url,
        params={"value": str(is_enable_direct_signon).lower()},
        method="POST",
        body=user_id_ls,
        context=context,
    )
    if return_raw:
        return res

    if not res.is_success:
        raise SSO_AddUserDirectSignonError(res=res, user_id_ls=user_id_ls)

    res.response = f"successfully added {', '.join(user_id_ls)} to direct signon list in {auth.domo_instance}"

    return res

update_sso_oidc_config async

update_sso_oidc_config(
    auth: DomoAuth,
    body_sso: dict,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
)

to update saml config must update temp and then standard typically would hide under class functions, but b/c Domo won't update w/o it, pushing down to Route

Source code in src/crew_dcs/routes/instance_config/sso.py
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def update_sso_oidc_config(
    auth: dmda.DomoAuth,
    body_sso: dict,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """
    to update saml config must update temp and then standard
    typically would hide under class functions, but b/c Domo won't update w/o it, pushing down to Route
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    await _update_sso_oidc_temp_config(
        auth=auth,
        body_sso=body_sso,
        context=context,
    )

    return await _update_sso_oidc_standard_config(
        auth=auth,
        body_sso=body_sso,
        context=context,
    )

update_sso_saml_config async

update_sso_saml_config(
    auth: DomoAuth,
    body_sso: dict,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
)

to update saml config must update temp and then standard typically would hide under class functions, but b/c Domo won't update w/o it, pushing down to Route

Source code in src/crew_dcs/routes/instance_config/sso.py
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def update_sso_saml_config(
    auth: dmda.DomoAuth,
    body_sso: dict,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """
    to update saml config must update temp and then standard
    typically would hide under class functions, but b/c Domo won't update w/o it, pushing down to Route
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    context = RouteContext.build_context(context=context, **context_kwargs)

    await _update_sso_saml_temp_config(
        auth=auth,
        body_sso=body_sso,
        context=context,
    )

    return await _update_sso_saml_standard_config(
        auth=auth,
        body_sso=body_sso,
        context=context,
    )

See also

Domo Knowledge Base categories

  • Administer Domo (users, groups, roles, grants, instance settings, activity log)