Skip to content

A2A BrokeredAccessRequest exception #103

@davidhsu-weicloud

Description

@davidhsu-weicloud

Hi,

My code as follow,

    BrokeredAccessRequest breq = new BrokeredAccessRequest();
    breq.setAccessType(BrokeredAccessRequestType.Rdp);
    breq.setForUserId(3);
    breq.setAssetId(51);
    breq.setAccountId(75);
    breq.setRequestedDurationHours((long) 2);
    
    char [] apikey="u5VPB6DSPgSYY6vFstZ+Ya9yK2t+ohNo/n9uhGsnd/w=".toCharArray();
    
    response=a2acontext.brokerAccessRequest(apikey,breq);

When run it, It throw exception as follow:

[ERROR] Error returned from Safeguard API, Error: 400 {"Code":70000,"Message":"The request is invalid.","ModelState":{"entity.AccessRequestType":["Error converting value "Rdp" to type 'Pangaea.Data.Transfer.V2.Policies.AccessRequestType'. Path 'AccessRequestType', line 1, position 63."]}}

I use SafeguardJava 6.11.133386 and my Safeguard version is 6.11 too
Please help, very thanks~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions