Skip to content

Entrypoint doesn't write DRAWIO_MSGRAPH_TENANT_ID to msgraph_tenant_id #204

Closed as not planned

Description

@rcross-lc

The entrypoint script writes out DRAWIO_MSGRAPH_TENANT_ID to PreConfig.js, but not msgraph_tenant_id.

if [[ -z "${DRAWIO_MSGRAPH_CLIENT_ID}" ]]; then
echo "urlParams['od'] = '0'; //OneDrive" >> $CATALINA_HOME/webapps/draw/js/PreConfig.js
else
#Google drive application id and client id for the editor
echo "window.DRAWIO_MSGRAPH_CLIENT_ID = '${DRAWIO_MSGRAPH_CLIENT_ID}'; " >> $CATALINA_HOME/webapps/draw/js/PreConfig.js
echo -n "${DRAWIO_MSGRAPH_CLIENT_ID}" > $CATALINA_HOME/webapps/draw/WEB-INF/msgraph_client_id
echo -n "${DRAWIO_MSGRAPH_CLIENT_SECRET}" > $CATALINA_HOME/webapps/draw/WEB-INF/msgraph_client_secret
if [[ "${DRAWIO_MSGRAPH_TENANT_ID}" ]]; then
echo "window.DRAWIO_MSGRAPH_TENANT_ID = '${DRAWIO_MSGRAPH_TENANT_ID}'; " >> $CATALINA_HOME/webapps/draw/js/PreConfig.js
fi
fi

The server app is expecting to read the tenant id from this file here:

https://github.com/jgraph/drawio/blob/890ea0b7880f4962bfc2b25b35103286aad0d1cb/src/main/java/com/mxgraph/online/MSGraphAuth.java#L13

I can work around this by writing the tenant id out to a file and bind mounting it:

- type: bind
  source: ./msgraph_tenant_id
  target: /usr/local/tomcat/webapps/draw/WEB-INF/msgraph_tenant_id
  read_only: true

Also bonus meme: comments in this section reference google drive.

Activity

  1. davidjgraph commented on Sep 29, 2026

    @davidjgraph

    Confirmed: the entrypoint never writes WEB-INF/msgraph_tenant_id, so the server-side token exchange always goes to login.microsoftonline.com/common/, which single-tenant apps reject. Your bind mount is the right workaround.

    We're replacing the Java back-end with our Node back-end, so we won't be fixing issues in the Java servlets. Closing on that basis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions