Azure / Microsoft365R

R SDK for interacting with Microsoft 365 APIs
Other
308 stars 41 forks source link

MS365R on Posit Connect #168

Closed mxshiv closed 5 months ago

mxshiv commented 1 year ago

Can you please guide me on using the MS365R on Posit Connect? Thanks.

I was able to authenticate on Workbench using the advice I got back from this forum but I believe that Connect will probably require a different approach. In the main authentication vignette (Authenticating to Microsoft 365 (r-project.org) ) it says:

If you want to use Microsoft365R outside a local R session, creating a custom app registration is required. In particular, this includes the following common scenarios: o Using Microsoft365R inside a Shiny webapp o Using it in an unattended (automated) script, eg in a GitHub Actions workflow or other CI/CD pipeline

See the vignettes “Using Microsoft365R in a Shiny app” and “Using Microsoft365R in an unattended script” for more on these use cases, including how to configure the app registration in Azure Active Directory.

The first vignette Using Microsoft365R in an unattended script (r-project.org) does seem to start talking about service accounts as an option which is something we would like to test as well.

The second one on Shiny specifically (Using Microsoft365R in a Shiny app (r-project.org)) seems to talk about individual authorisation per Shiny application.

Though I am a bit confused as to whether this then tries to use individual permissions in that app, vs what we want is more the service account approach so that the application has a certain set access regardless of who uses it. And also ideally I think we would prefer a solution that allows the service account for all apps without needing to manually approve each one?

Can you please guide? Many thanks.

Regards

mladencucak commented 1 year ago

Any progress on this?

mxshiv commented 1 year ago

Is it ok to test the first vignette Using Microsoft365R in an unattended script (r-project.org)?

hongooi73 commented 10 months ago

I don't know what Posit Connect is. Is that the new name for Rstudio workspaces, ie running R on a remote shared server? If so, you shouldn't need to create a new app ID. Just authenticate with the device_code authflow; see the authentication vignette for more on this.

mladencucak commented 10 months ago

POSIT is the new name for RStudio company. Although the tool still has the same name.