Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  How to use gc command

    Posted 06-05-2025 18:33

    user3 | 2025-01-17 14:38:08 UTC | #1

    Is the following GC Command correct when adding a role to a user?

    gc authorization roles users add update {roleid}

    Executing the following command will result in the error “The request could not be understood by the server due to malformed syntax" error.

    echo {"entities": [{"id": "ffd199fc-b4f0-4a9f-95f3-3429ea3b61a2","id": "40a2c353-3b4d-4af1-8843-a4ff4ffb1d40"}]}|gc authorization roles users add update e24508f1-ab05-40c7-a758-fda6b215bcf0 -p lab

    What could be the cause?


    Jerome.Saint-Marc | 2025-01-17 16:05:44 UTC | #2

    Hello,

    You can try with this. The input is an array of strings (array of userIds). echo "[\"ffd199fc-b4f0-4a9f-95f3-3429ea3b61a2\", \"40a2c353-3b4d-4af1-8843-a4ff4ffb1d40\"]"|gc authorization roles users add update e24508f1-ab05-40c7-a758-fda6b215bcf0

    Regards,


    user3 | 2025-01-18 08:20:45 UTC | #3

    Hi Jerome,

    Thank you very much. Success.

    Best Regards,


    system | 2025-02-17 08:21:17 UTC | #4

    This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 31275