Support Questions

Find answers, ask questions, and share your expertise

How to Nifi RestApi with Azure AD authentication

avatar
Hello Everyone,
I have successfully configured NiFi with Azure AD authentication by following https://github.com/benkelly/NiFi-Authentication-with-Azure-Active-Directory-Setup-Guide. NiFi is working as expected.
However, I am facing an issue when trying to use the REST API. When I attempt to obtain a token using the /nifi-api/access/token endpoint with an AD user’s credentials, I receive the following error:
"Username/Password login not supported by this NiFi."
I need guidance on how to properly authenticate and use the REST API with my current Azure AD setup.
Additionally, if creating a separate file-based user is required for REST API access, what changes should I make to the current configuration to support both AD authentication and a file-based user for API access?
I am new to NiFi, so I would appreciate detailed guidance on resolving this issue.
Thanks in advance!
1 REPLY 1

avatar
Master Mentor

@AlokVenugopal 

The "/nifi-api/access/token" endpoint is used by the ldap-provider or kerberos-provider NiFi login providers. Since you are using an OIDC (SSO) provider, you would need to obtain the token from that provider.    

You can utilize the developer tools available in most browsers to capture the rest-api call being made to NiFi from you browser. While I do not have a setup utilizing Azure AD, I'd expect you should be able to see the redirect to the Azure endpoint to get the token.

Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt