5.5

Table Of Contents
Example: Import a User from a SAML Identity Provider
This example is identical to the one shown in “Example: Import a User from an LDAP Database,” on
page 222, but includes a ProviderType element that specifies the source as the organization's SAML identity
provider. It also omits the IsExternal element, which is required when importing from LDAP but is ignored
when importing from SAML.
Request:
POST https://vcloud.example.com/api/admin/org/26/users
Content-Type: application/vnd.vmware.admin.user+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<User
xmlns="http://www.vmware.com/vcloud/v1.5"
name="user@example.com"
type="application/vnd.vmware.admin.user+xml">
<IsEnabled>true</IsEnabled>
<ProviderType>SAML</ProviderType>
<Role
type="application/vnd.vmware.admin.role+xml"
href="https://vcloud.example.com/api/admin/role/105" />
</User>
Response:
201 Created
Content-Type: application/vnd.vmware.admin.user+xml
...
<User
xmlns="http://www.vmware.com/vcloud/v1.5"
name="user@example.com"
id="urn:vcloud:user:85"
type="application/vnd.vmware.admin.user+xml"
href="https://vcloud.example.com/api/admin/user/85">
<Link
rel="edit"
type="application/vnd.vmware.admin.user+xml"
href="https://vcloud.example.com/api/admin/user/85" />
<FullName>Imported User Full Name</FullName>
<EmailAddress>user@example.com</EmailAddress>
<IsEnabled>true</IsEnabled>
<ProviderType>SAML</ProviderType>
<NameInSource>\F4\D3\42\8E\6A\BC\D3</NameInSource>
<IsAlertEnabled>false</IsAlertEnabled>
<IsDefaultCached>false</IsDefaultCached>
<StoredVmQuota>0</StoredVmQuota>
<DeployedVmQuota>0</DeployedVmQuota>
<Role
type="application/vnd.vmware.admin.role+xml"
href="https://vcloud.example.com/api/admin/role/105" />
<GroupReferences />
</User>
vCloud API Programming Guide
226 VMware, Inc.