- SAS MICROSOFT OFFICE ADD IN DOWNLOAD HOW TO
- SAS MICROSOFT OFFICE ADD IN DOWNLOAD REGISTRATION
- SAS MICROSOFT OFFICE ADD IN DOWNLOAD CODE
- SAS MICROSOFT OFFICE ADD IN DOWNLOAD DOWNLOAD
Admin Consent Required: Some permissions cannot be delegated or granted without the approval of an administrator.However, some use cases require use of Application permissions, which allow the application to take actions without a signed-in user and potentially access data across the system and different users. Delegated versus Application Permissions: In our example, we are sticking to Delegated permissions, which allow the application to take actions on behalf of the signed-in user and provides access to the user's data.Permission types have their own terminology that is important to understand: You'll sign in with your Microsoft 365 credentials.
SAS MICROSOFT OFFICE ADD IN DOWNLOAD REGISTRATION
Visit the Microsoft Application Registration portal to register your new app. Have fun with Outlook, Teams, Excel, and all of your favorite cloud-based Microsoft apps. Oh, and by the way, even though the examples in this article are specific to OneDrive, the exact same authentication flow and steps can be used for all of the Microsoft 365 APIs. When that happens, you'll need to repeat steps 2 and 3 to get a new set of access/refresh tokens.
Occasionally that refresh token can be revoked (and thus made invalid) when certain events occur (such as you changing your account password). This refresh token step can be automated in your program, usually run just once per session. The access token is valid for a limited time (usually 1 hour), but you can always exchange the refresh token for a new valid access token. Steps 2 and 3 can be done just once, or at least just occasionally. You'll have to complete Step 1 just once for your application or project.
SAS MICROSOFT OFFICE ADD IN DOWNLOAD DOWNLOAD
SAS MICROSOFT OFFICE ADD IN DOWNLOAD CODE
With your authorization code in hand, plug this into a SAS program (PROC HTTP step) to retrieve an OAuth2 access token (and a refresh token).Using your browser while you are signed into Microsoft 365, navigate to a special web address to obtain an authorization code for your application.(You will need to sign in with your Microsoft 365 credentials, which might be your primary organization credentials if you have single-signon with Active Directory.) Register a new client application at the Microsoft Azure Portal.Fortunately, these need to be done just once, or at least infrequently. This requires several setup steps, a few of which cannot be automated. When we're writing SAS programs to access Microsoft OneDrive or SharePoint, we're actually writing a third-party app. Joseph Henry does a great job of deconstructing OAuth2 - with code samples - in this SAS Global Forum paper. If you're accustomed to the simpler style of just user/password authentication (ah, those were the days), OAuth2 can be intimidating. Microsoft 365 uses an OAuth2-style authentication flow to grant access and permissions to third-party apps.
Using SAS with Microsoft 365: an overview And I also recorded a 25-minute video (posted on SAS Support Communities) that shows all of the steps that I followed.Ĭlick to watch the video tutorial. I wrote a comprehensive paper for SAS Global Forum 2020. Note: I've updated this article several times to include detailed steps and "gotchas." I've added use cases for SharePoint Online and Microsoft Teams. He also regularly adds new features to PROC HTTP that make it a more natural fit for calling REST APIs that require special authentication flows, such as OAuth2. Joseph did the heavy lifting for putting together the code and examples in this article. Note: All of this assumes that you already have a Microsoft 365 account - perhaps provisioned by your IT support team - and that you're using it to manage your documents.īefore I go on, I have to give major credit to Joseph Henry, the SAS developer who maintains PROC HTTP.
SAS MICROSOFT OFFICE ADD IN DOWNLOAD HOW TO
In this article, I'll show you how to use SAS programs to reach into your Microsoft OneDrive (or SharePoint Online) cloud to read and update your files. It also adds some exciting possibilities! The Microsoft 365 suite offers APIs to discover, fetch, and update our documents using code. Oh joy.įor those of us who use SAS to read and create Microsoft Excel documents, cloud-based files can add an extra wrinkle when we automate the process. I can update now my spreadsheets while waiting in the dentist office. It's not yet a complete replacement for having local files on your desktop machine, but with cloud storage and apps - like Microsoft OneDrive - I can now access my work documents from any browser and any device, including my smartphone. If your work environment is like ours here at SAS, you're seeing more of your data and applications move to the cloud.