RPA.MSGraph

The MSGraph library wraps the O365 package, giving robots the ability to access the Microsoft Graph API programmatically.

OAuth Configuration

Graph's API primarily authenticates via the OAuth 2.0 authorization code grant flow or OpenID Connect. This library exposes the OAuth 2.0 flow for robots to authenticate on behalf of users. A user must complete an initial authentication flow with the help of our OAuth Graph Example Bot.

For best results, register an app in Azure AD and configure it as so:

  • The type is "Web App".
  • Redirect URI should be https://login.microsoftonline.com/common/oauth2/nativeclient
  • The app should be a multi-tenant app.
  • Accounts in any organizational directory is checked.
  • Has relevant permissions enabled, check the Microsoft Graph permissions reference for a list of permissions available to MS Graph apps.

Importing

When importing the library to Robot Framework, you can set the client_id and client_secret.

param client_id:
 Application client ID.
param client_secret:
 Application client secret.
param token:Not implemented. Will support providing the authorization token object directly.
param refresh_token:
 Authorization refresh token obtained from prior OAuth flows.
param redirect_uri:
 Must be provided with client ID and client secret if not using the default.
param vault_backend:
 Not implemented. Will support using the Control Room vault directly for authorization token management.
param vault_secret:
 Not implemented. Will support using the Control Room vault directly for authorization token management.
param file_backend_path:
 Indicate a path where the tokens will be stored within the robot, the default is /temp.