Azure / Microsoft365R

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

Use Two Accounts #194

Open SHogenboom opened 7 months ago

SHogenboom commented 7 months ago

@hongooi73 ; is it possible to use one account for OneDrive and another account for Outlook acces within the same code?

I currently have:

onedrive <- Microsoft365R::get_business_onedrive()
outlook <- Microsoft365R::get_business_outlook()

For which I logged in once via the browser. I would like to change the outlook connection, but am unsure how to cancel the authorization?

Ideally I would like to go to a situation where I can specify the email/credentials for each of the accounts:

onedrive <- Microsoft365R::get_business_onedrive(email = “account1”)
outlook <- Microsoft365R::get_business_outlook(email = “account2”)

How would I be able to achieve this?

hongooi73 commented 5 months ago

I'm not the best person to ask about authentication matters. Check the documentation for the AzureAuth package, I think there's a way to do it by passing a certain arg.