<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: REST API &amp;quot;User is not authorized.&amp;quot; in ONTAP Rest API Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/REST-API-quot-User-is-not-authorized-quot/m-p/441512#M431</link>
    <description>&lt;P&gt;&lt;SPAN&gt;certname should be same in cert create and install commands and also in login account creation step.&lt;BR /&gt;&lt;BR /&gt;[linux ~]$ openssl req -x509 -nodes -days 1095 -newkey rsa:2048 -keyout name.key -out name.pem -subj “/C=US/ST=NC/L=RTP/O=NetApp/&lt;STRONG&gt;CN=cert_user&lt;/STRONG&gt;”&lt;BR /&gt;&lt;BR /&gt;security certificate install -type &lt;STRONG&gt;client-ca -cert-name&amp;nbsp;cert_user&lt;/STRONG&gt;&amp;nbsp;-vserver &amp;lt;cluster short name&amp;gt;&lt;BR /&gt;&lt;BR /&gt;security login create -&lt;STRONG&gt;user-or-group-name cert_user&lt;/STRONG&gt;&amp;nbsp;-application ontapi -authentication-method cert&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;security login create -&lt;STRONG&gt;user-or-group-name cert_user&lt;/STRONG&gt;&amp;nbsp;-application http -authentication-method cert&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://netapp.io/2020/06/25/cert4uid-pswd/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://netapp.io/2020/06/25/cert4uid-pswd/&amp;nbsp;&lt;/A&gt;cert is created for cert_user but admin user is configured in ontap.&lt;/P&gt;&lt;P&gt;but david warn about user&lt;BR /&gt;&lt;EM&gt;For the CN=cert_user this needs to be the user that will be connecting, so for admin again it would be CN=admin.&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Feb 2023 02:32:59 GMT</pubDate>
    <dc:creator>MOHANRAJB</dc:creator>
    <dc:date>2023-02-08T02:32:59Z</dc:date>
    <item>
      <title>REST API "User is not authorized."</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/REST-API-quot-User-is-not-authorized-quot/m-p/441374#M428</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to connect via HTTP as part of this Ansible task:&lt;/P&gt;&lt;PRE&gt;- name: Get LUNs&lt;BR /&gt;netapp.ontap.na_ontap_rest_info:&lt;BR /&gt;hostname: '{{ ontap_host }}'&lt;BR /&gt;cert_filepath: '{{ ontap_crt }}'&lt;BR /&gt;key_filepath: '{{ ontap_key }}'&lt;BR /&gt;gather_subset:&lt;BR /&gt;- 'storage/luns'&lt;BR /&gt;fields:&lt;BR /&gt;- 'comment'&lt;BR /&gt;https: True&lt;BR /&gt;validate_certs: False&lt;BR /&gt;register: lun_info&lt;/PRE&gt;&lt;P&gt;but receive:&lt;/P&gt;&lt;PRE&gt;Error using REST for version, error: {'code': '6691623', 'message': 'User is not authorized.'}.&lt;/PRE&gt;&lt;P&gt;The user and role should be configured correctly:&lt;/P&gt;&lt;PRE&gt;fc-netapp::&amp;gt; security login show -user-or-group-name orchestrator&lt;BR /&gt;&lt;BR /&gt;Vserver: fc-netapp&lt;BR /&gt;Second&lt;BR /&gt;User/Group Authentication Acct Authentication&lt;BR /&gt;Name Application Method Role Name Locked Method&lt;BR /&gt;-------------- ----------- ------------- ---------------- ------ --------------&lt;BR /&gt;orchestrator http cert georg_dev - none&lt;BR /&gt;&lt;BR /&gt;Vserver: vs_wilde&lt;BR /&gt;Second&lt;BR /&gt;User/Group Authentication Acct Authentication&lt;BR /&gt;Name Application Method Role Name Locked Method&lt;BR /&gt;-------------- ----------- ------------- ---------------- ------ --------------&lt;BR /&gt;orchestrator http cert georg_dev - none&lt;BR /&gt;2 entries were displayed.&lt;BR /&gt;&lt;BR /&gt;fc-netapp::&amp;gt; security login rest-role show -role georg_dev&lt;BR /&gt;Role Access&lt;BR /&gt;Vserver Name API Level&lt;BR /&gt;---------- ------------- ------------------- ------&lt;BR /&gt;fc-netapp georg_dev /api/cluster all&lt;BR /&gt;/api/cluster/ all&lt;BR /&gt;vs_wilde georg_dev /api/storage all&lt;BR /&gt;/api/storage/ all&lt;BR /&gt;4 entries were displayed.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A second user using username/passphrase authentication is able to connect using this role, only this new certificate based user won't work. I configured it according to &lt;A href="https://netapp.io/2020/06/25/cert4uid-pswd/" target="_blank"&gt;https://netapp.io/2020/06/25/cert4uid-pswd/&lt;/A&gt; and the variables shown above reference the respective certificate/key pair.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What could I be missing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any ideas!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 09:53:19 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/REST-API-quot-User-is-not-authorized-quot/m-p/441374#M428</guid>
      <dc:creator>geeko</dc:creator>
      <dc:date>2025-06-04T09:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: REST API "User is not authorized."</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/REST-API-quot-User-is-not-authorized-quot/m-p/441512#M431</link>
      <description>&lt;P&gt;&lt;SPAN&gt;certname should be same in cert create and install commands and also in login account creation step.&lt;BR /&gt;&lt;BR /&gt;[linux ~]$ openssl req -x509 -nodes -days 1095 -newkey rsa:2048 -keyout name.key -out name.pem -subj “/C=US/ST=NC/L=RTP/O=NetApp/&lt;STRONG&gt;CN=cert_user&lt;/STRONG&gt;”&lt;BR /&gt;&lt;BR /&gt;security certificate install -type &lt;STRONG&gt;client-ca -cert-name&amp;nbsp;cert_user&lt;/STRONG&gt;&amp;nbsp;-vserver &amp;lt;cluster short name&amp;gt;&lt;BR /&gt;&lt;BR /&gt;security login create -&lt;STRONG&gt;user-or-group-name cert_user&lt;/STRONG&gt;&amp;nbsp;-application ontapi -authentication-method cert&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;security login create -&lt;STRONG&gt;user-or-group-name cert_user&lt;/STRONG&gt;&amp;nbsp;-application http -authentication-method cert&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://netapp.io/2020/06/25/cert4uid-pswd/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://netapp.io/2020/06/25/cert4uid-pswd/&amp;nbsp;&lt;/A&gt;cert is created for cert_user but admin user is configured in ontap.&lt;/P&gt;&lt;P&gt;but david warn about user&lt;BR /&gt;&lt;EM&gt;For the CN=cert_user this needs to be the user that will be connecting, so for admin again it would be CN=admin.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 02:32:59 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/REST-API-quot-User-is-not-authorized-quot/m-p/441512#M431</guid>
      <dc:creator>MOHANRAJB</dc:creator>
      <dc:date>2023-02-08T02:32:59Z</dc:date>
    </item>
  </channel>
</rss>

