User_SAML - Account not provisioned

Nextcloud version: 12.0.0
Operating system and version: Ubuntu Server
Apache or nginx version (eg, Apache 2.4.25): 16.04.2_amd64
PHP version: 7.0.18
Is this the first time you’ve seen this error?: No

Can you reliably replicate it? (If so, please outline steps):

  1. Login using LDAPUser
  2. Connects fine
  3. Go into apps and enable User_SAML
  4. Connect to NextCloud and get forwarded to IDP for login
  5. Login using same account
  6. Get error: Account not provisioned. Your account is not provisioned, access to this service is thus not possible.

The issue you are facing:
I am trying to config Centrify IDP for SAML authentication and while I know Centrify isn’t officially supported, SAML is SAML and should be able to work. We have LDAP configured through Active Directory and the authentication works fine using the SamAccountName. I current have the Uuid setup as the “Username” when I view users in NextCloud but have also changed it to the SamAccountName name with the same issue. When sending the SAML assertion the ID is passed as:
<NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">BC######-#BEF-41EB-BC##-F#CECB#####C</NameID>
In NextCloud I have the “Attribute to map the uuid to” set to “urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified” and have verified the uuid being passed matches the account “Username” in “Users” within NextCloud.

Any ideas on what could be causing the issue? Thanks!

1 Like

Figured it out. The subject field was not able to be used as a UID identifier. I added another attribute to the SAML assertion and had it use that for the UID and its working. Now my SMB mounts don’t work though but I’ll open another case for that issue.

1 Like

@karmakaze - could you provide a bit more detail on how you a) worked out what the problem was; and b) resolved this issue. I am also trying to get SAML working with Centrify and I am getting the same “account is not provisioned” error.

1 Like

Thank you for sharing the solution but still can you please elaborate for a noob like me cause I’ve wasted so many hours for this issue and can’t able to understand what’s causing this error. can you provide me a link where you followed to add nextcloud for keylcoak that’d be great. Thanks in Advance.

I know this is long dead but just for documentation’s sake:

In Settings > LDAP / AD integration:

In ADFS’ MMC > Relying Party Trusts > [relyingparty] > Edit Claim Issuance Policy…:
(…or whatever your IdP if not ADFS)

In Settings > SSO & SAML authentication > Attribute to map the UID to.:

I’m far from a federation expert, but, it seems the trick is matching a given value in as many places as possible. I guess you could use sAMAccountName as well but the UPN is supposed to be unique…ish. At least unique enough unlike the sAMAccountName but much easier than the UUID that no user knows or will ever know about himself/herself–the default on Nextcloud.

It’s odd that this plugin is not documented.

:slight_smile: