-
Notifications
You must be signed in to change notification settings - Fork 15
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
Authorization code error for posit workbench rstudio ide #86
Comments
You need to change your redirect URI. your browser will be going to localhost on your desktop machine, where there is nothing running. You can to use the rserver-url command or rstudioapi::translateLocalUrl to generate a proxy address which will allow your browser to reach localhost on workbench. if you are wedded to the authorisation code flow, |
Hello Mattmalcher, Below is the script I am running, I have appended the above output to redirect uri. library(AzureAuth) When I run this I get the following error Error: Expecting a single value: [extent=0]. Also I tried replace redirect uri with http://localhost:1410/p/77c02a62 library(AzureAuth) I get a browser window opened with "AADSTS50011: The redirect URI 'https://localhost:1410' specified in the request does not match the redirect URIs configured for the application. Make sure the redirect URI sent in the request matches one added to your application in the Azure portal" When I set an redirect uri in my azure application and run the above code , I am again getting localhost refused to connect error. Any suggestions would be much appreciated. |
Hello, has there been any action yet? We are using Posit IDE hosted via Kubernetes which means we need to configure the redirect_uri in order for the authentication to work properly. We are trying to get some sharepoint resources like this library(AzureAuth)
library(AzureGraph)
library(Microsoft365R)
tenant = "tenant-id"
site_url = "site-url"
app = "app-id"
redirect = "https://workbench-url.com"
# Add sensitive variables as environmental variables so they aren't exposed
user <- rstudioapi::askForSecret("user")
pwd <- rstudioapi::askForSecret("pwd")
app_secret <- rstudioapi::askForSecret("app_secret")
# Create auth token cache directory, otherwise it will prompt the user on the console for input
create_AzureR_dir()
# create a Microsoft Graph login
gr <- create_graph_login(tenant, app,
username = user,
password = pwd,
token_args = list(client_secret = app_secret),
auth_type="authorization_code",
authorize_args=list(redirect_uri=redirect))
# An example of using the Graph login to connect to a SharePoint site
site <- gr$get_sharepoint_site(site_url) This results in the error Due to the nature of our setup we are depending on the abillity to set the redirect_uri. Would greatly appreciate any further help. |
I am using azure auth in posit workbench rstudio ide which hosted on RHEL8 Linux azure server. Every time device code , the authentication is happening but for Authorization-code, the authentication is not happening.
I get localhost not found for the port 1410. It works normally in Rstudio ide
The text was updated successfully, but these errors were encountered: