# UXP InDesign Plugin require('uxp').userInfo.userId() returns empty string

**URL:** <https://forums.creativeclouddeveloper.com/t/uxp-indesign-plugin-require-uxp-userinfo-userid-returns-empty-string/7838>\
**Category:** UXP Plugin API\
**Tags:** plugin, bug, uxp, javascript, indesign\
**Created:** [May 1, 2024, 11:11am UTC](https://forums.creativeclouddeveloper.com/t/uxp-indesign-plugin-require-uxp-userinfo-userid-returns-empty-string/7838 "2024-05-01T11:11:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kamila](https://avatars.discourse-cdn.com/v4/letter/k/74df32/32.png) [@Kamila](https://forums.creativeclouddeveloper.com/u/Kamila)\
**Post date:** [May 1, 2024, 11:11am UTC](https://forums.creativeclouddeveloper.com/t/uxp-indesign-plugin-require-uxp-userinfo-userid-returns-empty-string/7838/1 "2024-05-01T11:11:12Z")

</div>

I’m writing InDesign plugin using UXP. I need to get the GUID of plugin user.  
The code:  
As stated in docs, added to manifest.json

```auto
"requiredPermissions": {
  "enableUserInfo": true
}

```

and getting userId in main.js

```auto
const { entrypoints, userInfo } = require("uxp");
const { app } = require("indesign");

entrypoints.setup({
  commands: {
    showAlert: () => showAlert()
  },
  panels: {
    showPanel: {
      show({node} = {}) {}
    }
  }
});

showAlert = () => {
    const dialog = app.dialogs.add();
    const col = dialog.dialogColumns.add();
    const colText = col.staticTexts.add();

    let userId = userInfo.userId(); // Get the GUID of plugin user
    colText.staticLabel = "Congratulations! You just executed your first command. "+ userId;
    
    dialog.canCancel = false;
    dialog.show();
    dialog.destroy();
    return;
}

```

The problem is that userId returns empty. I’m successfully logged in with Creative cloud account. InDesign and UXP versions are appropriate.  
Could you please help to find the problem?

---

<div class="post-metadata">

**Author:** ![lucsali](https://avatars.discourse-cdn.com/v4/letter/l/e8c25b/32.png) [@lucsali](https://forums.creativeclouddeveloper.com/u/lucsali)\
**Post date:** [January 15, 2025, 12:45pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-indesign-plugin-require-uxp-userinfo-userid-returns-empty-string/7838/2 "2025-01-15T12:45:31Z")

</div>

I’m experiencing the same behavior in InDesign. Has anyone successfully managed to retrieve the GUID via UXP?
