User already exists but no authentication provider found. Please do a PostUser request.
Description
When a user attempts any interaction with the configuration APIs.
Scope
This error will happen whenever a new user is added that has not logged in at least once, which will trigger a POST request to /api/maintenance/user. It will happen on both the Customer Hosted Model and the SaaS Model
Error Message
This is the error message returned to the portal user
{
"message": "User [username or app registration id] already exists but no authentication provider found. Please do a PostUser request.",
"errors": [
"User [username or app registration id] already exists but no authentication provider found. Please do a PostUser request."
]
}
Known Instances
Service Principals
When creating a brand new Service Principle to use for service accounts on the platform.
# Cause
This happens when the user has not been verified at least once. If a User is added to an existing Customer, Project or Environment and the user has never attempted to log on to the NPO Portal (npobp_portal), the user is created in an unverified state.
Resolution
For this user to become verified, they need to do a POST to /api/maintenance/user and pass their valid JWT token. This happens automatically when the user first logs on to the NPO Portal (npobp_portal) However, if the user is a Service Principal (App Registration), the POST request should be made to the same endpoint as above. The POST request only requires the JWT Authorization Bearer token and any keys required to allow access to the API (e.g. APIM subscription keys). Either of these actions will verify the user and the user will be able to continue