Skip to main content

security oauth2 scope scope-to-cli generate

Contributors
Suggest changes

Generate CLI REST role command for the given OAuth 2.0 scope

Availability: This command is available to cluster administrators at the admin privilege level.

Description

The security oauth2 scope scope-to-cli generate command generates on ONTAP CLI security login rest-role create command that is the equivalent of the specified OAuth 2.0 scope string.

Parameters

-scopeString <text> - OAuth 2.0 scope

The OAuth 2.0 scope string. This parameter is required.

Examples

To generate ONTAP CLI command given an OAuth 2.0 scope string applicable to all clusters for an ONTAP role named restclusterrole for the REST API URI /api/cluster with readonly access:

cluster1::gt; security oauth2 scope scope-to-cli generate -scopeString ontap:*:restclusterrole:readonly:*:/api/cluster
Command for cluster <All>:
security login rest-role create -role restclusterrole -access readonly -api /api/cluster