Highlighted
Contributor.. Janu Jagtiani Contributor..
Contributor..
478 views

How to capture Azure Bearer Token in VUGEN to replay - Token expires every 1 5mins

Dear Team,

Request your guidance asto how we can script to capture Azure JAW token-"Bearer Token".

I have picked the token as it is available on UI (of same code) (shown in the screenshot) and the same token I need to use it and script for API of my code.

Token expires every 15 minutes.

Please find attachment.

Kindly advise as I am not sure how can I pick it from UI and place it in API body of my VUGEN script.

Thank you

 

0 Likes
1 Reply
Shashi Kant Valued Contributor.
Valued Contributor.

Re: How to capture Azure Bearer Token in VUGEN to replay - Token expires every 1 5mins

Hi Janu,

As your token is on UI , it means it must be availble in response of the page. So using any of correlation function store this value in parameter. Once correlation is sucessfull , you can paas the parameter to API body or where ever is required like in header.

Correlation function- 

web_reg_save_param_regexp(
        "ParamName=Token",
        "RegExp=(.*?)",     ----> modify it according to your requirement
        SEARCH_FILTERS,
        "Scope=ALL",
        LAST);

You can use boundary based correlation also.

Use parameter like {Token}, whereever it is required.

Regards

shashi kant

            

Regards

shashi kant

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.