-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display authentification URL when running "m365 setup" #6332
Comments
@apc005 thanks for this suggestion 👍. We will look into it ASAP |
Is there a way for me to formulate the required URL from the error message below? I am attempting to login from a headless installation and getting the following (ID's replaced by xxx): $ m365 login Error: spawn xdg-open ENOENT |
I don't really understand what you're asking. Is it related to this issue? |
Sorry for the confusion. Our installation is on a "headless" linux server with no web browser installed. So, the operation to popup an interactive web browser during the m365 setup and/or login was failing and produced the above error message. I was wondering if there was some manual way to put together a URL that could be copy/pasted into a browser to do the authentication. The error message does show a URL but it did not seem to work when I pasted it into a web browser. Anyway, as I indicated in the other issue (6333) our installation is working again after manually adding the app registration permissions and doing a m365 login with the appID and tenant ID. So, my comment can be disregarded. Thank you for looking at this. The feature requested in this ticket, to display the authentication URL when running m365 setup, would be very useful and I hope it can be implemented. Thank you! |
Thanks for the clarification. Glad to hear your setup works again. The site that we try to open is to authenticate the current user and be able to create a new application registration in Azure that CLI can consume. Logging the URL, just like we do for |
@dshirk-uci you may already get the URL just by adding the |
For headless servers you should use the device code login method which is made specifically for this case: it prints a code in the terminal which you copy and paste to the login page. Have you considered using it @apc005? |
Thx but I was talking about the "setup" process, not the login one |
To clarify @waldekmastykarz, when running |
Ah sorry, I misunderstood. Thank you for clarifying. In that case, we should consider allowing you to choose whether you want to login to Azure using the browser or device code auth. Is there btw a reason you need to create the app from the headless server rather than say locally and on the headless server use the option to use an existing app? |
Priority
(Low) Something is a little off
Description
When setting up m365 you are required to do an interactive login to create an AppId in Office 365 Tenant. On a headless server this is not easy (you have to install a browser an tunnel a X.Windows session within ssh for example). I suggest the command could print the required URL in the terminal, so that you can copy/paste it in, a local browser
Steps to reproduce
m365 setup, create a new appId in the Tenant
Expected results
Display the URL as well as trying to start the browser
Actual results
Just starts the browser
Diagnostics
No response
CLI for Microsoft 365 version
v9.0.0
nodejs version
v18.19.0
Operating system (environment)
Windows
Shell
bash
cli doctor
No response
Additional Info
No response
The text was updated successfully, but these errors were encountered: