Skip to content

Commit 99f7dd2

Browse files
aeneasrvinckr
andauthored
docs: explain how to import organization users and SAML (#2079)
* docs: explain how to import organization users and SAML * chore: apply suggestions from code review * chore: format --------- Co-authored-by: Vincent <[email protected]>
1 parent cef194e commit 99f7dd2

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

docs/kratos/manage-identities/25_import-user-accounts-identities.mdx

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,81 @@ Connect ID Token provider such as Google.
634634
}
635635
```
636636
637+
### SAML connections
638+
639+
When importing SAML connections, the `provider` field is the SAML provider ID you set in your SAML configuration. The `subject` ID
640+
must be the ID of the user on the given platform. The subject should not be an email, but a fixed user ID that never changes.
641+
642+
```json {7-20}
643+
{
644+
"schema_id": "preset://email",
645+
"traits": {
646+
"email": "[email protected]"
647+
},
648+
"credentials": {
649+
"saml": {
650+
"config": {
651+
"providers": [
652+
{
653+
"provider": "okta",
654+
"subject": "12345"
655+
},
656+
{
657+
"provider": "one-login",
658+
"subject": "12345"
659+
}
660+
]
661+
}
662+
}
663+
}
664+
}
665+
```
666+
667+
## Organization-specific SAML and OIDC connections
668+
669+
When importing SAML or OIDC connections that are only available for certain [organizations](../organizations/organizations.mdx)
670+
(for example `[email protected]`), you can use the `organization` field to specify the organization that the user belongs to.
671+
672+
```json
673+
{
674+
"schema_id": "preset://email",
675+
"traits": {
676+
"email": "[email protected]"
677+
},
678+
// highlight-start
679+
"organization": "9ed50339-d6b9-47ef-9610-194773f3bfbf",
680+
// highlight-end
681+
"credentials": {
682+
"saml": {
683+
"config": {
684+
"providers": [
685+
{
686+
"provider": "okta",
687+
"subject": "12345",
688+
// highlight-start
689+
"organization": "9ed50339-d6b9-47ef-9610-194773f3bfbf"
690+
// highlight-end
691+
}
692+
]
693+
}
694+
},
695+
"oidc": {
696+
"config": {
697+
"providers": [
698+
{
699+
"provider": "github",
700+
"subject": "12345",
701+
// highlight-start
702+
"organization": "9ed50339-d6b9-47ef-9610-194773f3bfbf"
703+
// highlight-end
704+
}
705+
]
706+
}
707+
}
708+
}
709+
}
710+
```
711+
637712
## Bulk import identities from other providers
638713
639714
To import multiple identities into Ory Identities, use the

0 commit comments

Comments
 (0)