You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- alternative_acs_url: An alternative URL to use for the `AssertionConsumerServiceURL` in SP initiated SAML AuthNRequests. This value can be used when you wish to migrate an existing SAML integration to Stytch with zero downtime. Note that you will be responsible for proxying requests sent to the Alternative ACS URL to Stytch. Read our [SSO migration guide](https://stytch.com/docs/b2b/guides/migrations/additional-migration-considerations) for more info.
160
161
- idp_initiated_auth_disabled: Determines whether IDP initiated auth is allowed for a given SAML connection. Defaults to false (IDP Initiated Auth is enabled).
161
162
- saml_encryption_private_key: A PKCS1 format RSA private key used to decrypt encrypted SAML assertions. Only PKCS1 format (starting with "-----BEGIN RSA PRIVATE KEY-----") is supported.
- alternative_acs_url: An alternative URL to use for the `AssertionConsumerServiceURL` in SP initiated SAML AuthNRequests. This value can be used when you wish to migrate an existing SAML integration to Stytch with zero downtime. Note that you will be responsible for proxying requests sent to the Alternative ACS URL to Stytch. Read our [SSO migration guide](https://stytch.com/docs/b2b/guides/migrations/additional-migration-considerations) for more info.
264
269
- idp_initiated_auth_disabled: Determines whether IDP initiated auth is allowed for a given SAML connection. Defaults to false (IDP Initiated Auth is enabled).
265
270
- saml_encryption_private_key: A PKCS1 format RSA private key used to decrypt encrypted SAML assertions. Only PKCS1 format (starting with "-----BEGIN RSA PRIVATE KEY-----") is supported.
"""Add a User to Stytch. A `user_id` is returned in the response that can then be used to perform other operations within Stytch. An `email` or a `phone_number` is required.
56
57
57
58
Fields:
59
+
- roles: Roles to explicitly assign to this User.
60
+
See the [RBAC guide](https://stytch.com/docs/guides/rbac/role-assignment) for more information about role assignment.
58
61
- email: The email address of the end user.
59
62
- name: The name of the user. Each field in the name object is optional.
60
63
- attributes: (no documentation yet)
@@ -69,7 +72,9 @@ def create(
69
72
- external_id: An identifier that can be used in API calls wherever a user_id is expected. This is a string consisting of alphanumeric, `.`, `_`, `-`, or `|` characters with a maximum length of 128 characters.
70
73
"""# noqa
71
74
headers: Dict[str, str] = {}
72
-
data: Dict[str, Any] = {}
75
+
data: Dict[str, Any] = {
76
+
"roles": roles,
77
+
}
73
78
ifemailisnotNone:
74
79
data["email"] =email
75
80
ifnameisnotNone:
@@ -95,6 +100,7 @@ def create(
95
100
96
101
asyncdefcreate_async(
97
102
self,
103
+
roles: List[str],
98
104
email: Optional[str] =None,
99
105
name: Optional[Name] =None,
100
106
attributes: Optional[Attributes] =None,
@@ -107,6 +113,8 @@ async def create_async(
107
113
"""Add a User to Stytch. A `user_id` is returned in the response that can then be used to perform other operations within Stytch. An `email` or a `phone_number` is required.
108
114
109
115
Fields:
116
+
- roles: Roles to explicitly assign to this User.
117
+
See the [RBAC guide](https://stytch.com/docs/guides/rbac/role-assignment) for more information about role assignment.
110
118
- email: The email address of the end user.
111
119
- name: The name of the user. Each field in the name object is optional.
112
120
- attributes: (no documentation yet)
@@ -121,7 +129,9 @@ async def create_async(
121
129
- external_id: An identifier that can be used in API calls wherever a user_id is expected. This is a string consisting of alphanumeric, `.`, `_`, `-`, or `|` characters with a maximum length of 128 characters.
- trusted_metadata: The `trusted_metadata` field contains an arbitrary JSON object of application-specific data. See the [Metadata](https://stytch.com/docs/api/metadata) reference for complete field behavior details.
276
287
- untrusted_metadata: The `untrusted_metadata` field contains an arbitrary JSON object of application-specific data. Untrusted metadata can be edited by end users directly via the SDK, and **cannot be used to store critical information.** See the [Metadata](https://stytch.com/docs/api/metadata) reference for complete field behavior details.
277
288
- external_id: An identifier that can be used in API calls wherever a user_id is expected. This is a string consisting of alphanumeric, `.`, `_`, `-`, or `|` characters with a maximum length of 128 characters.
289
+
- roles: Roles to explicitly assign to this User.
290
+
See the [RBAC guide](https://stytch.com/docs/guides/rbac/role-assignment) for more information about role assignment.
- trusted_metadata: The `trusted_metadata` field contains an arbitrary JSON object of application-specific data. See the [Metadata](https://stytch.com/docs/api/metadata) reference for complete field behavior details.
318
334
- untrusted_metadata: The `untrusted_metadata` field contains an arbitrary JSON object of application-specific data. Untrusted metadata can be edited by end users directly via the SDK, and **cannot be used to store critical information.** See the [Metadata](https://stytch.com/docs/api/metadata) reference for complete field behavior details.
319
335
- external_id: An identifier that can be used in API calls wherever a user_id is expected. This is a string consisting of alphanumeric, `.`, `_`, `-`, or `|` characters with a maximum length of 128 characters.
336
+
- roles: Roles to explicitly assign to this User.
337
+
See the [RBAC guide](https://stytch.com/docs/guides/rbac/role-assignment) for more information about role assignment.
0 commit comments