Skip to main content

Notifications

Community site session details

Community site session details

Session Id : iiepk3IVuXGQHTXCaeHMOt
Power Automate - Using Connectors
Unanswered

Audience in an HTTP request via Active Directory OAuth

Like (1) ShareShare
ReportReport
Posted on 18 Dec 2019 16:02:05 by 8

Hi,

I'd like to automate some tasks in Power BI Service. Unfortunately, there is only a simple connector for Power BI. It means I have to write my own custom connector or create some HTTP request by myself (https://docs.microsoft.com/en-us/rest/api/power-bi/). That's ok for me.

But the problem is: I've registered an app in Azure and got client ID and client secret. But if I want to create an HTTP request with Active Directory OAuth, there is a field I don't understand: audience. I wasn't able to find out what I should write in. Does anybody have an idea what the field is for and what should be there?

Thank you for every hint.

 

audience.png

  • MelMacLondon Profile Picture
    13 on 11 Jun 2024 at 13:40:56
    Re: Audience in an HTTP request via Active Directory OAuth

    Thank you !!! 

    https://service.flow.microsoft.com/

     

    Works for Power Automate Flow. 

  • WillPage Profile Picture
    1,907 on 22 May 2024 at 03:34:27
    Re: Audience in an HTTP request via Active Directory OAuth

    @slx299The URL it's trying to redirect you to is the user-interactive M365 login page. Check your app registration settings in Entra ID.

  • dan-data-cescoe Profile Picture
    5 on 20 May 2024 at 05:33:50
    Re: Audience in an HTTP request via Active Directory OAuth

    yes, this worked

  • slx Profile Picture
    108 on 24 Apr 2023 at 10:10:02
    Re: Audience in an HTTP request via Active Directory OAuth

    Hi 

     

    We're using similar set-up but continuously getting redirect error

     

    Any idea? 

    {

    "statusCode": 302,

    "headers": {

    "x-ms-proxy-app-id": "2cff5b2f-XXXX",

    "x-ms-proxy-group-id": "e4a5613f-XXXX",

    "x-ms-proxy-subscription-id": "f05d05b1-XXXX",

    "x-ms-proxy-transaction-id": "b78db4ca-XXX",

    "x-ms-proxy-service-name": "proxy-appproxy-FRC-XXX3",

    "x-ms-proxy-data-center": "FRC",

    "Nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.2,\"failure_fraction\":1.0}",

    "Report-To": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\https://ffde.nelreports.net/api/report?cat=proxy-appproxy-FRC-PAR03P-3\}]}",

    "Location": https://login.microsoftonline.com/XXX/oauth2/authorize?response_type=code&client_id=XXX&scope=openid&nonce=XXXX&redirect_uri=https%3a%2f%2fuatdataservices-regulator.msappproxy.net%2f&state=AppProxyState%3a%7b%22InvalidTokenRetry%22%3anull%2c%22IsMsofba%22%3afalse%2c%22OriginalRawUrl%22%3a%22https%3a%5c%2f%5c%2fuatdataservices-regulator.msappproxy.net%5c%2f%22%2c%22RequestProfileId%22%3anull%2c%22SessionId%22%3a%XXXX%22%7d%23EndOfStateParam%23&client-request-id=XXXX,

    "Set-Cookie": "AzureAppProxyPreauthSessionCookie_XXXXd_1.4=4|YCE4Hcw8OHX88FyfQ0XHyK+nRvRAX+Iij3lcIlVNIcfUjxC4/sBKpmCfbf0eF8FCfwMcucU269zfDGwhK44Zf+ZgiREzc5pOMBY0vG1O1nA2yaxmYNlvVzBSQ7RY+y/0j9Qh1w8vW5wPHIz5EsjQwHkuw5O2aUI4kcPqJ3NTFgQkyMjiCkEpfpJBF5ZfFMz7bFJmYZFKa3gcerGFE9sSTxJJXVKS49gqk/gOahVLO6aiS9DqPcvw2CROXaY0fx3VCwkH/T6bDBjrWoy6UAzgFgvzsOrjy4Vj9DseZL6JkFA=; expires=Thu, 20 Apr 2023 15:40:25 GMT; path=/; Secure; SameSite=None,AzureAppProxyAnalyticCookie_2cff5b2f-a47f-4211-972c-47756d35b164_https_1.3=4|S5I5lk58QFcl9UPrvJ8DZ7kGEieOSYuXhIrhLdzHt9e+hTyToDiHxtpb+uhZaeeHCXhMl0LiIe5Tajyb+jo40T5GGR8R9YbMriGLh81b4iCc9pWUkGtErQbQQ/Ffmi9ePetBkfIA87iiPGkLSPl6LQ==; path=/; Secure; SameSite=None",

    "Date": "Thu, 20 Apr 2023 15:30:24 GMT",

    "Content-Length": "0"

    }

    }

     

    thank you

     

  • wab Profile Picture
    22 on 08 Dec 2021 at 07:28:06
    Re: Audience in an HTTP request via Active Directory OAuth

    The solution is to make sure you added the api that you created in Azure to security group. That group also need to be allowed to use service principals and need to be added to environment as Member. 

  • WillPage Profile Picture
    1,907 on 08 Dec 2021 at 00:00:06
    Re: Audience in an HTTP request via Active Directory OAuth

    I came across this topic while searching for the answer to what to put in the Audience field in the Authentication object. I found this works for the Power BI API. Note there is no trailing / character, which exists in the API permissions in the App Registration:

     

     

  • IHPROLAN Profile Picture
    6 on 22 Nov 2021 at 13:14:18
    Re: Audience in an HTTP request via Active Directory OAuth

    Hello, I am also having trouble using the OAuth. I get the same error. Is there any solution on that?

  • wab Profile Picture
    22 on 04 Nov 2021 at 15:28:06
    Re: Audience in an HTTP request via Active Directory OAuth

    Did you managed to find a solutions?

  • swiftinitdotcom Profile Picture
    14 on 29 Oct 2021 at 15:55:53
    Re: Audience in an HTTP request via Active Directory OAuth

    I have exactly same issue-Http request failed as there is an error getting AD OAuth token: 'AADSTS500011: The resource principal named "https://service.flow.microsoft.com" was not found in the tenant named swiftinit. This can happen if the 

  • seadude Profile Picture
    1,855 on 10 Aug 2021 at 15:28:10
    Re: Audience in an HTTP request via Active Directory OAuth

    Hm. I'm not able to get this to work: 

    - Registered app in AAD:

    seadude_0-1628609155689.png

    - Setup HTTP action accordingly

    seadude_1-1628609194311.png

     

    Results:

    seadude_2-1628609236412.png

     

    Any ideas on what I'm missing?

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!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard

Featured topics