Support intro
Sorry to hear you’re facing problems. 
The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.
If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.
Getting help
In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.
Before clicking submit: Please check if your query is already addressed via the following resources:
- Official documentation (searchable and regularly updated)
- How to topics and FAQs
- Forum search
(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).
The Basics
- Nextcloud Server version (e.g., 29.x.x):
34.0.1
- Operating system and version (e.g., Ubuntu 24.04):
Rocky Linux 10.2
- Web server and version (e.g, Apache 2.4.25):
-
- Reverse proxy and version _(e.g. nginx 1.27.2)
nginx 1.28.3
- PHP version (e.g, 8.3):
php 8.4.16
- Is this the first time you’ve seen this error? (Yes / No):
Yes
- When did this problem seem to first start?
After Setup SAML
- Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
Linuxserver Container
- Are you using CloudfIare, mod_security, or similar? (Yes / No)
No
Loadbalancer->caddy(host)->nginx(nextcloud) is the setup here.
Summary of the issue you are facing:
I checked all the logs I could still find related to that.
When SAML is enabled the redirect URL that is generated on the loginpage is doubled.
I have the normal loginpage enabled inside the SAML/SSO App too.
I searched my config up and down to see if I would find something.
In the end my hackjob was to butcher the URL generator for the button.
Hopes are that there is just a quirk in my config.
This issue specifically happens if I were to directly hit “Microsoft Entra ID”.
Steps to replicate it (hint: details matter!):
-
Configure SAML and keep the loginpage enabled.
-
Login with MS Entra ID Button => https://name.domain.com/apps/user_saml/saml/login?idp=1&method=get&originalUrl=https://name.domain.com/https://name.domain.com/&requesttoken=
-
Get redirected to double URL. Obviously the space https://name.domain.com/ does not exist. And it requests to go back. But this causes issues for the Nextcloud app.
Log entries
Nextcloud
Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.
I have not found anything to that issue - would have to heavily redact the log
Web Browser
If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.
I see Nextcloud generates following URL on the button https://name.domain.com/apps/user_saml/saml/login?idp=1&method=get&originalUrl=https://name.domain.com/https://name.domain.com/&requesttoken=<token>
This ends up redirecting onto https://name.domain.com/https://name.domain.com/ after the login finished.
Web server / Reverse Proxy
The output of your Apache/nginx/system log in /var/log/____:
PASTE HERE
Configuration
Nextcloud
The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):
{
"system": {
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"scvnextcloud01:8443",
"name.domain.com"
],
"dbtype": "mysql",
"version": "34.0.1.2",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"skeletondirectory": "",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"memcache.local": "\\OC\\Memcache\\APCu",
"filelocking.enabled": true,
"upgrade.disable-web": true,
"maintenance": false,
"app_install_overwrite": [],
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "25",
"mail_sendmailmode": "smtp",
"mail_smtpstreamoptions": {
"ssl": {
"allow_self_signed": false,
"verify_peer": true,
"verify_peer_name": true
}
},
"forbidden_filename_basenames": [
"con",
"prn",
"aux",
"nul",
"com0",
"com1",
"com2",
"com3",
"com4",
"com5",
"com6",
"com7",
"com8",
"com9",
"com\u00b9",
"com\u00b2",
"com\u00b3",
"lpt0",
"lpt1",
"lpt2",
"lpt3",
"lpt4",
"lpt5",
"lpt6",
"lpt7",
"lpt8",
"lpt9",
"lpt\u00b9",
"lpt\u00b2",
"lpt\u00b3"
],
"forbidden_filename_characters": [
"<",
">",
":",
"\"",
"|",
"?",
"*",
"\\",
"\/"
],
"forbidden_filename_extensions": [
" ",
".",
".filepart",
".part"
],
"twofactor_enforced": "true",
"twofactor_enforced_groups": [
"guest_app",
"admin",
"Extern",
"Pankl"
],
"twofactor_enforced_excluded_groups": [],
"maintenance_window_start": 2,
"serverid": "0",
"default_phone_region": "AT",
"default_language": "en",
"default_timezone": "Europe\/Vienna",
"default_locale": "en_AT",
"loglevel": 2,
"overwritehost": "name.domain.com",
"overwriteprotocol": "https",
"overwrite.cli.url": "https:\/\/name.domain.com"
}
}
Apps
The output of occ app:list (if possible).
root@c10df333dab1:/# occ app:list
Enabled:
- activity: 7.0.0
- appstore: 1.0.0
- bruteforcesettings: 7.0.0
- circles: 34.0.0
- cloud_federation_api: 1.18.0
- contacts: 8.7.4
- dav: 1.39.0
- federatedfilesharing: 1.24.0
- files: 2.6.0
- files_antivirus: 6.3.2
- files_automatedtagging: 5.0.0
- files_downloadlimit: 5.2.0-dev.0
- files_lock: 34.0.0
- files_pdfviewer: 7.0.0-dev.0
- files_retention: 5.0.0
- files_sharing: 1.26.0
- files_trashbin: 1.24.0
- files_versions: 1.27.0
- groupfolders: 22.0.3
- guests: 4.8.0
- logreader: 7.0.0
- lookup_server_connector: 1.22.0
- notifications: 7.0.0-dev.1
- oauth2: 1.22.0
- password_policy: 6.0.0-dev.0
- privacy: 6.0.0-dev.1
- profile: 1.3.0
- provisioning_api: 1.24.0
- serverinfo: 6.0.0
- settings: 1.17.0
- sharebymail: 1.24.0
- survey_client: 6.0.0-dev.0
- systemtags: 1.24.0
- text: 8.0.0
- theming: 2.9.0
- twofactor_backupcodes: 1.23.0
- twofactor_totp: 16.0.0
- updatenotification: 1.24.0
- user_saml: 8.2.0
- viewer: 7.0.0-dev.0
- workflowengine: 2.16.0
Disabled:
- admin_audit: 1.24.0
- app_api: 34.0.0 (installed 34.0.0)
- comments: 1.24.0 (installed 1.24.0)
- contactsinteraction: 1.15.0 (installed 1.15.0)
- dashboard: 7.14.0 (installed 7.14.0)
- encryption: 2.22.0
- federation: 1.24.0 (installed 1.24.0)
- files_external: 1.26.0
- files_reminders: 1.7.0 (installed 1.7.0)
- firstrunwizard: 7.0.0-dev.0 (installed 7.0.0-dev.0)
- nextcloud_announcements: 6.0.0 (installed 6.0.0)
- office: 1.0.0 (installed 1.0.0)
- photos: 7.0.0 (installed 7.0.0)
- recommendations: 7.0.0 (installed 7.0.0)
- related_resources: 5.0.0-dev.0 (installed 5.0.0-dev.0)
- support: 6.0.0 (installed 6.0.0)
- suspicious_login: 12.0.0-dev.0
- twofactor_nextcloud_notification: 8.0.0
- user_ldap: 1.25.0 (installed 1.25.0)
- user_status: 1.14.0 (installed 1.14.0)
- weather_status: 1.14.0 (installed 1.14.0)
- webhook_listeners: 1.6.0 (installed 1.6.0)
Workaround
Since I had a double URL I searched where this is generated.
Which is: **/opt/nextcloud/config/www/nextcloud/apps/user_saml/lib/AlternativeLogin/AlternativeLoginProvider.php
**
Specifically this part:
I changed to
I have no deep knowledge of php. But what happens at $absoluteRedirectUrl seems to generate the double URL for me. Also I noticed without this part the URL from myapps would fail and only direct to the loginpage. But the SSO from the loginpage would work as expected when I get the Entra ID logon.
I am just really wondering if this is an actual bug or a config mistake.
I checked the logs if I found anything relevant to that. But it seems literally just this one URL generating thing.


