Authenticationtokens with Windows user failed

Hi,

I try to use the API REST authenticationstokens with a "Windows user" authentication (OAuth)

function authentication() {

     result = await $.ajax({
        url: "https://*******/REST/server/authenticationtokens",
        type: "POST",
        timeout: 0,
        headers: {
            "Accept": "application/json;odata=verbose",
        },
        data: JSON.stringify({
            "Username": "username@domain.ext",
            "Password": "***********",
            "Domain" : "domain.ext",
            "VaultGuid": <vault GUID without braces>
            "sessionID": <a random GUID>,
            "Expiration": "2040-01-01T23:59:00Z"
        }),
    });

My problem is that it gives me a 403 error when I use this token is an another API REST

{
    "Status": 403,
    "URL": "/session",
    "Method": "GET",
    "Exception": {
        "Name": "UnauthorizedAccessException",
        "Message": "Login to vault failed"
    },
    "Stack": "Error reference ID: f915f9de-6fc3-49d6-a30d-3fd3cd30d63d",
    "Message": "Login to vault failed",
    "IsLoggedToVault": false,
    "IsLoggedToApplication": false,
    "ExceptionName": "UnauthorizedAccessException"
}
But with "M-Files user" authentication it is working
I tried also the username like this
"domain.ext\\username"
or
"domain.ext/username"
Thanks for your help
Jocelyn
Parents Reply Children
No Data