diff --git a/app/Models/SnipeSCIMConfig.php b/app/Models/SnipeSCIMConfig.php index 221bf7d2e9..36a9ac855c 100644 --- a/app/Models/SnipeSCIMConfig.php +++ b/app/Models/SnipeSCIMConfig.php @@ -41,8 +41,10 @@ class SnipeSCIMConfig extends \ArieTimmerman\Laravel\SCIMServer\SCIMConfig } ); - $config['validations'][$core.'externalId'] = 'string'; // not required, but supported mostly just for Okta - $mappings['externalId'] = AttributeMapping::eloquent('scim_externalid'); + // externalId support + $config['validations'][$core.'externalId'] = 'string|nullable'; // not required, but supported mostly just for Okta + // note that the mapping is *not* namespaced like the other $mappings + $config['mapping']['externalId'] = AttributeMapping::eloquent('scim_externalid'); $config['validations'][$core.'emails'] = 'nullable|array'; // emails are not required in Snipe-IT... $config['validations'][$core.'emails.*.value'] = 'email'; // ...(had to remove the recommended 'required' here) diff --git a/app/Models/User.php b/app/Models/User.php index 09e3509124..8211fabd63 100755 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -61,6 +61,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo 'remote', 'start_date', 'end_date', + 'scim_externalid' ]; protected $casts = [