Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

trying to get access token in flow (getting realm and resource)

(0) ShareShare
ReportReport
Posted on by 21

Hi,

 

I get the following error when trying to get an access token via flow: {"error":"invalid_request","error_description":"AADSTS90019: Unable to determine the tenant identifier from the request. Client ID 'xxxxx' does not specify a tenant realm.

I've a sharepoint app where I've got the necessary details (clientid, secretid,tenantid) and given it the relative permissions.

I presume I'm not combining the client and tenant ID correctly or perhaps not setting the resource as required. 

Has anyone done this post request via flow? I've attached a screenshot of what I've done. 

share42.JPG

 

Thanks for any support. 

  • pypycodes Profile Picture
    3 on at
    Re: trying to get access token in flow (getting realm and resource)

    Thanks and this has worked form me

  • Verified answer
    Community Power Platform Member Profile Picture
    on at
    Re: trying to get access token in flow (getting realm and resource)

    It might be too late for you but my solution can be useful to someone else.

    client_id value used in body request  must be: client_id +@+Tenant_Id. It looks like:

     

    818bec3f-e529-432b-gdf4-2f2fa20d60ef@55f96fd4-fab6-49c3-bd24-dl0d60b17095

     

     

  • Byrdwatcher1967 Profile Picture
    10 on at
    Re: trying to get access token in flow (getting realm and resource)

    Hi Kris, 

    I guess it's quite similar to the link you posted. The first step where the http request is received returns the secretid, tenantid and clientid from a sharepoint app. This step returns three values. These values seem correct. I'm getting the clientid and secretid from the sharepoint app and tenantid from sharepoint/office365. 

    The next steps are just returning variables and the last one is where I try to get the access token. 

     

     share54.JPG

     

    If I change the access token step to do the following below:

    share55.JPG

    I get the following error message:

    {"error":"invalid_request","error_description":"AADSTS90019: Unable to determine the tenant identifier from the request. Client ID 'b3ea9883-xxx' does not specify a tenant realm...."

     

    Thanks

  • v-xida-msft Profile Picture
    on at
    Re: trying to get access token in flow (getting realm and resource)

    Hi @Byrdwatcher1966,

     

    Could you share a full screenshot of your flow’s configuration?

    The error message told that there is something wrong with the tenantID content from the request and your Client ID doesn’t specify a tenant realm.

    Please check if you have provided proper tenantID content and Client ID in "Get access token" action.

     

    In addition, check and see if the following article would help in your scenario:

    https://powerusers.microsoft.com/t5/Microsoft-Flow-Community-Blog/Generate-an-Azure-OAuth2-0-Token-from-a-quot-service-quot-Flow/ba-p/61979

     

    Best regards,

    Kris

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,026 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow