Introduce @me.id and @me.userName to simplify working with the current user #3055
Unanswered
waldekmastykarz
asked this question in
Ideas
Replies: 2 comments 4 replies
-
Yes, something would be of added value for me 🦾 |
Beta Was this translation helpful? Give feedback.
0 replies
-
@waldekmastykarz: this will certainly help. I would also extend the status and add the id to the result, not only the upn as we do today How do we handle app only applications? Are we just returning undefined in these cases? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have commands that require you to specify the user's ID or name. Currently, there's no way to easily specify information about the current user. There are some workarounds like retrieve the user name from the
status
command. If you need user's ID you'd pass the name to theaad user get
command. We could also consider custom implementations in the different commands to introduce specific options like--me
. But this is all too cumbersome.Since we have information about the current user already available in the access token, we could introduce tokens like
@me.id
and@me.userName
that we'd replace with the corresponding information, similarly like we pass content from files. This would free us from having to have command-specific implementations and would make it easier to work with data specific to the current user.What do you think @pnp/cli-for-microsoft-365-maintainers?
Beta Was this translation helpful? Give feedback.
All reactions