Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

NameTypeDescriptionAvailable from version
IsAuthenticatedbool

PersonIdGuid

AccessLevelintAccessLevel of user. Usually value 10 or 1002.13

Code examples

Code Block
languagec#
themeRDark
titleC# - Authenticate an admin user
linenumberstrue
collapsetrue
//Use the UsernamePasswordAuthentication to authenticate an admin user
var client = new BFSServiceReference.bfsapiSoapClient();

var credentials = new BFSServiceReference.Credentials()
{
    UserName = bfsusername, //Username of administrative user in your instance of BFS
    Password = bfspassword, //Password of the administrative user in your instance of BFS
};

var authentication = client.UsernamePasswordAuthentication(new BFSServiceReference.UsernamePasswordAuthenticateRequest()
{
    Credentials = credentials,

    identify = bfsidentifier, //Identifier is a unique token for your instance of BFS  
    
    Domain = Domain.Admin,
    Password = "",
    Username = ""
    
});

Console.WriteLine(authentication.IsAuthenticated + "," + authentication.PersonId);

...