This how-to guide presents how to fix the 403 Forbidden error when using the Search Systems Logs card.
Error Example:
scope=\"okta.logs.read\",
error=\"insufficient_scope\", error_description=\"The access token provided does not contain the required scopes.\",
resource=\"/api/v1/logs\"
The Okta – Search Systems Logs card allows searching in the Okta log by a keyword (and also an expression, set in Options):
Search Systems Logs card.
When running a flow with this card, it might return a 403 Forbidden error:
403 Forbidden error with Search Systems Logs card.
- Okta Workflows
- Okta worklfows connection
- Okta Workflows Connection - Insufficient Scope
Video walkthrough of the steps written below:
To fix this error, grant an additional scope to the Okta connection.
- Grant the
okta.logs.readscope in the new permissions tab using custom scopes while reauthorizing the connection
OR
- From the Admin Console, go to Applications > Applications.
- Click Okta Workflows OAuth.
- Open the Okta API Scopes tab.
- Find the
okta.logs.readscope and click Grant. - For this scope to take effect, reauthorize the connection that is being used.
After reauthorizing the connection (to include reviewing the permissions tab), rerun the flow. The card is now able to search the logs:
Thanks to Bryan Barrows (LinkedIn, blog), who helped with this question on the MacAdmins Slack channel.
