"Headless" az login, serverside #163
-
Is there a way to print/get also the client id or - in other words - is there a reason why it is omitted from the console log? I mean, I've not yet looked at the code, but I assume it's calling the browser via a complete URL with the client id as a query parameter, so I wonder why it's not logged as well. Before thinking about forking the repo and possibly changing the code, I thought I'd rather start asking here first. My goal is to run |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 12 replies
-
I see that the interactive module calls an oauth client that returns the token. I guess the browser can't be opened on a different machine, because the result must be returned from the internal api call... Otherwise one would follow a different flow (maybe the device code or a non interactive flow). In particular I've noticed that one can perform:
|
Beta Was this translation helpful? Give feedback.
-
Btw, this is the az login prompt I'm talking about. For the sake of it, could one derive and show the client id at that point?
|
Beta Was this translation helpful? Give feedback.
-
hey guys there, it looks to me that Azure AD federated identity credentials solve the issue Enable authentication via environment variables, don't they? (they're also non-interactive, hence "better" from the point of view of my scenario here) |
Beta Was this translation helpful? Give feedback.
-
if you want to have non-ineteractive login, you should use service principal. |
Beta Was this translation helpful? Give feedback.
Btw, this is the az login prompt I'm talking about. For the sake of it, could one derive and show the client id at that point?
Nope, the client id comes from the access token that in turn is obtained after logging in with username and password: that finally explains why it is not in the
az login
log (before the browser is opened and the user is logged)!From the README: