web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / getting Data with Bear...
Power Automate
Unanswered

getting Data with Bearer token

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am calling this api through http connector. But it gives me 401.

 

It needs an authentication bearer token But I cant hardcode this value in flow since it will expire after sometime mostly 24 hours.

 

How can i  make it work??

 

https://extensionanalyzer.azure-test.net/api/extensiondeploymentsinfo?extensionName=Microsoft_Azure_DataProtection

Categories:
I have the same question (0)
  • rakadakaka Profile Picture
    77 on at

    If the end point which you are calling has no restriction on how many times the token generation endpoint can be called . My suggestion will be to regenerate the token every time you want to connect to the service and use the token in the endpoint call .

     

  • adigupt Profile Picture
    Microsoft Employee on at

    @rakadakaka Could you please tell me how can I regenerate new Token in Flow?? which API or connector i should Use?

  • rakadakaka Profile Picture
    77 on at

    @adigupt  :

     

    How are you getting authentication token 1st time ? You would be using some token endpoint to get the token .

     

    You can call the same token endpoint everytime you want to connect to the endpoint (extension analyzer endpoint) , No need to store the token anywhere .

     

    Again based on the limited information , you have provided in the post , this is what I can deduce .

     

    1. Resource which you are trying to connect :  https://extensionanalyzer.azure-test.net/api/extensiondeploymentsinfo?extensionName=Microsoft_Azure_DataProtection

     

    2. Resource server : https://extensionanaluzer.azure-test.net/

     

    3. Assuming you are using AAD as the IAM [Authorization Server] to get the token via a registered App on AAD .

     

    4.  If you are using AAD based on assumption from step 3 , you can call the AAD token endpoint for your token and get the token which you can pass as Bearer token in your API call .

     

    AAD Token endpoint URL

     https://login.microsoftonline.com/<<TenantID>>/oauth2/v2.0/token

     

    Step 3 and 4 are based on assumption . If you can tell which Authorization server is being used I can help further or how are you getting the 1st token which is valid for 24 hours ?

  • adigupt Profile Picture
    Microsoft Employee on at

    @rakadakaka  I am using AAD auth based authorization to get the bearer token.

     

    The Url is 

    https://login.microsoftonline.com/<tenantid>/oauth2/v2.0/token

     

     

  • rakadakaka Profile Picture
    77 on at

    Thanks @adigupt for clarifying . So, to get the token again you can call the same token end point again , no need to store the token every time regenerate a new token .

     

    https://login.microsoftonline.com/<tenantid>/oauth2/v2.0/token

     

    Please let me know if further help is need on this topic .

     

    If this helps , please accept it as solution , so it will help others in the community

     

  • adigupt Profile Picture
    Microsoft Employee on at

    @rakadakaka  but the problem is that this token api needs 3 things, tenantid, clientid & client_secret . I have tenantid and clientid but dont know client_secret. Also I  dont have access to this APP So I am not able to find client_secret. Do you know how can we get client_secret from clientid?

  • rakadakaka Profile Picture
    77 on at

    @adigupt  : Please reach out to tenant Administrator(AAD Administrator) and ask them to create a new client secret and provide it you . Which you can use for authentication .

     

    You can provide them client ID , for that particular client , Administrator can generate a new client secret and share with you .

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard