Files
authentik/website/docs/developer-docs/api/reference/rbac-permissions-assigned-by-users-assign.api.mdx
2024-09-13 12:17:54 -05:00

412 lines
22 KiB
Plaintext

---
id: rbac-permissions-assigned-by-users-assign
title: "rbac_permissions_assigned_by_users_assign"
description: "Assign permission(s) to user"
sidebar_label: "rbac_permissions_assigned_by_users_assign"
hide_title: true
hide_table_of_contents: true
api: eJytGV2P2yjwr1h+aqUcbrd9OOXpetXqtFJ7t+rHvaxWEbZJQmMDBZzdKMp/vxnAsR3HH1vdQzAMM8N8MDBMjrFUTFPLpbjL42WsU5qtAFJyYwBmVhS+G8HyVXpYVYbpGhIv4pyZTHOFtED5wYGjhvaVeR1ZGSERICuqacksMIiXD8eYI4midgtTAiZgxHPom2zLShovj7E9KAcVlm2Aw6m3XlQJ/rNiUcCI9rTAUc6E5esDF5vIbrmJvsP6BDhr9rPimoGSVlfs9LiILd2gME7n+NFjMGP/lPkBBcgkMBYWu1SpgmfOSskPg8sf+5LK9AfLbM8uXzxXNIW3XEQjwZ5ahkLraHSD5cwgw5b9W/yp1vQAuNyysg03VoOyMFFy8YmJDdh0+fYE9iplzgpEZKIqUVFa2S1aZ7cCxaiwhuSypBwFaKYyfVBWkgzFWaPSbMcOinLdwVoX8skQbAfABqzLUi5yL1uDIiurpHFrZzvYDkzvecbA2AKs561xBXlXpUwL2D9mJkHodCaVBC+CjVd5VZYH4loHO1xHY3sArEpqwdWauFEYjFI9K64PRIG3n6TO/XCCQDPnbtJ0xwg2THJFXDuGVktwFmUMWTNVWbfDSdMdISB+7pqHYTPvIQzhqChyqgg2NWgATyLwhpgMoqAE7GGOAdN/JrhC7xn8gO0EpqY5rwzxn1/BDfF7GBfe0LIg2Ews0cabwzbjJcFmim2Nd40dHoJEy4J1oEZWOmMtR3rAHJwx2WsS50bvzBHGPaz5rPHyaREOHBpdmo2WlZpPpAr2TLAZ0eACZ478jgTFb8jmCOKEn01y3mgjsl/gzJHdkbhk4Uw2RxAn+3ySejePyd7FGZUd7ytIbgI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nKpcytWpkrgwdWWPdtEFeiGU9DnGPZfqEUvOp6F6L7cgwBbunL5WSb0+ha3MvA4HlNq2HddnE4Ihp2j8UqA7p5qTlP0LGzWnBvsQxCsaWHYiF6vvoSAex29tOp+Vef6xBN43jkGGJaLeMcO/n+A0yNgbRnFJAVF9RMfvUC/fUPyhrB3QJ0WNcWHDHIzO4r72DoL7v/5ilssDX8AlO4AijXFGje2TkjpDOQC2cGOcUHFpsLMZhl7nu5ErtCh5/gO8byoO6jVVTOA8xzGN0x2wYG1VXzyC4Y5nf4DxbmwqA==
sidebar_class_name: "post api-method"
info_path: docs/developer-docs/api/reference/authentik
custom_edit_url: null
hide_send_button: true
---
import ApiTabs from "@theme/ApiTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import Markdown from "@theme/Markdown";
import Heading from "@theme/Heading";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
<Heading
as={"h1"}
className={"openapi__heading"}
children={"rbac_permissions_assigned_by_users_assign"}
>
</Heading>
<MethodEndpoint
method={"post"}
path={"/rbac/permissions/assigned_by_users/{id}/assign/"}
>
</MethodEndpoint>
Assign permission(s) to user
<Heading
id={"request"}
as={"h2"}
className={"openapi-tabs__heading"}
children={"Request"}
>
</Heading>
<details
style={{"marginBottom":"1rem"}}
className={"openapi-markdown__details"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
>
<h3
className={"openapi-markdown__details-summary-header-params"}
>
Path Parameters
</h3>
</summary><div>
<ul>
<ParamsItem
className={"paramsItem"}
param={{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this User.","required":true}}
>
</ParamsItem>
</ul>
</div>
</details><MimeTabs
className={"openapi-tabs__mime"}
>
<TabItem
label={"application/json"}
value={"application/json-schema"}
>
<details
style={{}}
className={"openapi-markdown__details mime"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-mime"}
>
<h3
className={"openapi-markdown__details-summary-header-body"}
>
Body
</h3><strong
className={"openapi-schema__required"}
>
required
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
</div><ul
style={{"marginLeft":"1rem"}}
>
<SchemaItem
collapsible={false}
name={"permissions"}
required={true}
schemaName={"string[]"}
qualifierMessage={"**Possible values:** `non-empty`"}
schema={{"type":"array","items":{"type":"string","minLength":1}}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"model"}
required={false}
schemaName={"ModelEnum (string)"}
qualifierMessage={"**Possible values:** [`authentik_tenants.domain`, `authentik_crypto.certificatekeypair`, `authentik_flows.flow`, `authentik_flows.flowstagebinding`, `authentik_outposts.dockerserviceconnection`, `authentik_outposts.kubernetesserviceconnection`, `authentik_outposts.outpost`, `authentik_policies_dummy.dummypolicy`, `authentik_policies_event_matcher.eventmatcherpolicy`, `authentik_policies_expiry.passwordexpirypolicy`, `authentik_policies_expression.expressionpolicy`, `authentik_policies_geoip.geoippolicy`, `authentik_policies_password.passwordpolicy`, `authentik_policies_reputation.reputationpolicy`, `authentik_policies.policybinding`, `authentik_providers_ldap.ldapprovider`, `authentik_providers_oauth2.scopemapping`, `authentik_providers_oauth2.oauth2provider`, `authentik_providers_proxy.proxyprovider`, `authentik_providers_radius.radiusprovider`, `authentik_providers_radius.radiusproviderpropertymapping`, `authentik_providers_saml.samlprovider`, `authentik_providers_saml.samlpropertymapping`, `authentik_providers_scim.scimprovider`, `authentik_providers_scim.scimmapping`, `authentik_rbac.role`, `authentik_sources_ldap.ldapsource`, `authentik_sources_ldap.ldapsourcepropertymapping`, `authentik_sources_oauth.oauthsource`, `authentik_sources_oauth.oauthsourcepropertymapping`, `authentik_sources_oauth.useroauthsourceconnection`, `authentik_sources_oauth.groupoauthsourceconnection`, `authentik_sources_plex.plexsource`, `authentik_sources_plex.plexsourcepropertymapping`, `authentik_sources_plex.userplexsourceconnection`, `authentik_sources_plex.groupplexsourceconnection`, `authentik_sources_saml.samlsource`, `authentik_sources_saml.samlsourcepropertymapping`, `authentik_sources_saml.usersamlsourceconnection`, `authentik_sources_saml.groupsamlsourceconnection`, `authentik_sources_scim.scimsource`, `authentik_sources_scim.scimsourcepropertymapping`, `authentik_stages_authenticator_duo.authenticatorduostage`, `authentik_stages_authenticator_duo.duodevice`, `authentik_stages_authenticator_sms.authenticatorsmsstage`, `authentik_stages_authenticator_sms.smsdevice`, `authentik_stages_authenticator_static.authenticatorstaticstage`, `authentik_stages_authenticator_static.staticdevice`, `authentik_stages_authenticator_totp.authenticatortotpstage`, `authentik_stages_authenticator_totp.totpdevice`, `authentik_stages_authenticator_validate.authenticatorvalidatestage`, `authentik_stages_authenticator_webauthn.authenticatorwebauthnstage`, `authentik_stages_authenticator_webauthn.webauthndevice`, `authentik_stages_captcha.captchastage`, `authentik_stages_consent.consentstage`, `authentik_stages_consent.userconsent`, `authentik_stages_deny.denystage`, `authentik_stages_dummy.dummystage`, `authentik_stages_email.emailstage`, `authentik_stages_identification.identificationstage`, `authentik_stages_invitation.invitationstage`, `authentik_stages_invitation.invitation`, `authentik_stages_password.passwordstage`, `authentik_stages_prompt.prompt`, `authentik_stages_prompt.promptstage`, `authentik_stages_user_delete.userdeletestage`, `authentik_stages_user_login.userloginstage`, `authentik_stages_user_logout.userlogoutstage`, `authentik_stages_user_write.userwritestage`, `authentik_brands.brand`, `authentik_blueprints.blueprintinstance`, `authentik_core.group`, `authentik_core.user`, `authentik_core.application`, `authentik_core.token`, `authentik_enterprise.license`, `authentik_providers_google_workspace.googleworkspaceprovider`, `authentik_providers_google_workspace.googleworkspaceprovidermapping`, `authentik_providers_microsoft_entra.microsoftentraprovider`, `authentik_providers_microsoft_entra.microsoftentraprovidermapping`, `authentik_providers_rac.racprovider`, `authentik_providers_rac.endpoint`, `authentik_providers_rac.racpropertymapping`, `authentik_stages_source.sourcestage`, `authentik_events.event`, `authentik_events.notificationtransport`, `authentik_events.notification`, `authentik_events.notificationrule`, `authentik_events.notificationwebhookmapping`]"}
schema={{"enum":["authentik_tenants.domain","authentik_crypto.certificatekeypair","authentik_flows.flow","authentik_flows.flowstagebinding","authentik_outposts.dockerserviceconnection","authentik_outposts.kubernetesserviceconnection","authentik_outposts.outpost","authentik_policies_dummy.dummypolicy","authentik_policies_event_matcher.eventmatcherpolicy","authentik_policies_expiry.passwordexpirypolicy","authentik_policies_expression.expressionpolicy","authentik_policies_geoip.geoippolicy","authentik_policies_password.passwordpolicy","authentik_policies_reputation.reputationpolicy","authentik_policies.policybinding","authentik_providers_ldap.ldapprovider","authentik_providers_oauth2.scopemapping","authentik_providers_oauth2.oauth2provider","authentik_providers_proxy.proxyprovider","authentik_providers_radius.radiusprovider","authentik_providers_radius.radiusproviderpropertymapping","authentik_providers_saml.samlprovider","authentik_providers_saml.samlpropertymapping","authentik_providers_scim.scimprovider","authentik_providers_scim.scimmapping","authentik_rbac.role","authentik_sources_ldap.ldapsource","authentik_sources_ldap.ldapsourcepropertymapping","authentik_sources_oauth.oauthsource","authentik_sources_oauth.oauthsourcepropertymapping","authentik_sources_oauth.useroauthsourceconnection","authentik_sources_oauth.groupoauthsourceconnection","authentik_sources_plex.plexsource","authentik_sources_plex.plexsourcepropertymapping","authentik_sources_plex.userplexsourceconnection","authentik_sources_plex.groupplexsourceconnection","authentik_sources_saml.samlsource","authentik_sources_saml.samlsourcepropertymapping","authentik_sources_saml.usersamlsourceconnection","authentik_sources_saml.groupsamlsourceconnection","authentik_sources_scim.scimsource","authentik_sources_scim.scimsourcepropertymapping","authentik_stages_authenticator_duo.authenticatorduostage","authentik_stages_authenticator_duo.duodevice","authentik_stages_authenticator_sms.authenticatorsmsstage","authentik_stages_authenticator_sms.smsdevice","authentik_stages_authenticator_static.authenticatorstaticstage","authentik_stages_authenticator_static.staticdevice","authentik_stages_authenticator_totp.authenticatortotpstage","authentik_stages_authenticator_totp.totpdevice","authentik_stages_authenticator_validate.authenticatorvalidatestage","authentik_stages_authenticator_webauthn.authenticatorwebauthnstage","authentik_stages_authenticator_webauthn.webauthndevice","authentik_stages_captcha.captchastage","authentik_stages_consent.consentstage","authentik_stages_consent.userconsent","authentik_stages_deny.denystage","authentik_stages_dummy.dummystage","authentik_stages_email.emailstage","authentik_stages_identification.identificationstage","authentik_stages_invitation.invitationstage","authentik_stages_invitation.invitation","authentik_stages_password.passwordstage","authentik_stages_prompt.prompt","authentik_stages_prompt.promptstage","authentik_stages_user_delete.userdeletestage","authentik_stages_user_login.userloginstage","authentik_stages_user_logout.userlogoutstage","authentik_stages_user_write.userwritestage","authentik_brands.brand","authentik_blueprints.blueprintinstance","authentik_core.group","authentik_core.user","authentik_core.application","authentik_core.token","authentik_enterprise.license","authentik_providers_google_workspace.googleworkspaceprovider","authentik_providers_google_workspace.googleworkspaceprovidermapping","authentik_providers_microsoft_entra.microsoftentraprovider","authentik_providers_microsoft_entra.microsoftentraprovidermapping","authentik_providers_rac.racprovider","authentik_providers_rac.endpoint","authentik_providers_rac.racpropertymapping","authentik_stages_source.sourcestage","authentik_events.event","authentik_events.notificationtransport","authentik_events.notification","authentik_events.notificationrule","authentik_events.notificationwebhookmapping"],"type":"string","title":"ModelEnum"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"object_pk"}
required={false}
schemaName={"string"}
qualifierMessage={"**Possible values:** `non-empty`"}
schema={{"type":"string","minLength":1}}
>
</SchemaItem>
</ul>
</details>
</TabItem>
</MimeTabs><div>
<div>
<ApiTabs
label={undefined}
id={undefined}
>
<TabItem
label={"200"}
value={"200"}
>
<div>
</div><div>
<MimeTabs
className={"openapi-tabs__mime"}
schemaType={"response"}
>
<TabItem
label={"application/json"}
value={"application/json"}
>
<SchemaTabs
className={"openapi-tabs__schema"}
>
<TabItem
label={"Schema"}
value={"Schema"}
>
<details
style={{}}
className={"openapi-markdown__details response"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-response"}
>
<strong>
Schema
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
</div><ul
style={{"marginLeft":"1rem"}}
>
<li>
<div
style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}
>
Array [
</div>
</li><SchemaItem
collapsible={false}
name={"id"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>
</SchemaItem><li>
<div
style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}
>
]
</div>
</li>
</ul>
</details>
</TabItem><TabItem
label={"Example (from schema)"}
value={"Example (from schema)"}
>
<ResponseSamples
responseExample={"[\n {\n \"id\": \"string\"\n }\n]"}
language={"json"}
>
</ResponseSamples>
</TabItem>
</SchemaTabs>
</TabItem>
</MimeTabs>
</div>
</TabItem><TabItem
label={"400"}
value={"400"}
>
<div>
</div><div>
<MimeTabs
className={"openapi-tabs__mime"}
schemaType={"response"}
>
<TabItem
label={"application/json"}
value={"application/json"}
>
<SchemaTabs
className={"openapi-tabs__schema"}
>
<TabItem
label={"Schema"}
value={"Schema"}
>
<details
style={{}}
className={"openapi-markdown__details response"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-response"}
>
<strong>
Schema
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
</div><ul
style={{"marginLeft":"1rem"}}
>
<SchemaItem
collapsible={false}
name={"non_field_errors"}
required={false}
schemaName={"string[]"}
qualifierMessage={undefined}
schema={{"type":"array","items":{"type":"string"}}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"code"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>
</SchemaItem><SchemaItem
name={"property name*"}
required={false}
schemaName={"any"}
qualifierMessage={undefined}
schema={{"type":"object","description":"Validation Error","properties":{"non_field_errors":{"type":"array","items":{"type":"string"}},"code":{"type":"string"}},"additionalProperties":{},"title":"ValidationError"}}
collapsible={false}
discriminator={false}
>
</SchemaItem>
</ul>
</details>
</TabItem><TabItem
label={"Example (from schema)"}
value={"Example (from schema)"}
>
<ResponseSamples
responseExample={"{\n \"non_field_errors\": [\n \"string\"\n ],\n \"code\": \"string\"\n}"}
language={"json"}
>
</ResponseSamples>
</TabItem>
</SchemaTabs>
</TabItem>
</MimeTabs>
</div>
</TabItem><TabItem
label={"403"}
value={"403"}
>
<div>
</div><div>
<MimeTabs
className={"openapi-tabs__mime"}
schemaType={"response"}
>
<TabItem
label={"application/json"}
value={"application/json"}
>
<SchemaTabs
className={"openapi-tabs__schema"}
>
<TabItem
label={"Schema"}
value={"Schema"}
>
<details
style={{}}
className={"openapi-markdown__details response"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-response"}
>
<strong>
Schema
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
</div><ul
style={{"marginLeft":"1rem"}}
>
<SchemaItem
collapsible={false}
name={"detail"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"code"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>
</SchemaItem>
</ul>
</details>
</TabItem><TabItem
label={"Example (from schema)"}
value={"Example (from schema)"}
>
<ResponseSamples
responseExample={"{\n \"detail\": \"string\",\n \"code\": \"string\"\n}"}
language={"json"}
>
</ResponseSamples>
</TabItem>
</SchemaTabs>
</TabItem>
</MimeTabs>
</div>
</TabItem>
</ApiTabs>
</div>
</div>