Skip to content
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

unable connect from systems without web browser #3

Closed
RollieParrish opened this issue Jan 16, 2021 · 5 comments
Closed

unable connect from systems without web browser #3

RollieParrish opened this issue Jan 16, 2021 · 5 comments

Comments

@RollieParrish
Copy link

When using this package on a Linux server that does not have a desktop environment, (ie. RStudio Server), the authentication via browser fails, as it opens a url to "localhost'.

The AzureRMR::create_azure_login() function has a parameter of auth_type='device_code', which is useful in this situation.

Can that be incorporated (some other solution)?

@RollieParrish
Copy link
Author

RollieParrish commented Jan 16, 2021

Just discovered that the *_onedrive() functions can pass through parameters to AzureGraph::create_graph_login(), including auth_type='device_code'.

So using od <- business_onedrive(auth_type = "device_code") works as expected.

@IdoBar
Copy link

IdoBar commented May 3, 2021

This seems to work when running the code as a script, but not when knitting RMarkdon file that depends on it and comes up with the following output:

Creating Microsoft Graph login for default tenant
Waiting for device code in browser...
Press Esc/Ctrl + C to abort

@hongooi73 , any suggestions or should I open a new issue for this?

@hongooi73
Copy link
Collaborator

If you run the script multiple times, do you have to login each time?

@IdoBar
Copy link

IdoBar commented May 3, 2021

I double-checked that and there a couple of things:
If I run it with auth_type='device_code' (knitting the RMarkdown), it always producing that warning, but I can't see the output with the code to enter.
If I run it without auth_type='device_code' it works fine as long as the token is valid (for 1 hour), but after the token has expired it was failing to refresh it.
It is working at the moment, but I'll update if that authentication issue returns.
BTW, it worked just fine until I had to change my organization password last week...

@hongooi73
Copy link
Collaborator

hongooi73 commented May 3, 2021

Clear your token cache as described in #5 (comment), and try it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants