I am attempting to retrieve and save an inline image from a Teams message. I have Power Automate reading the message and retrieving the image url. However, with Power Automate I just get 403 errors.
I am setting authentication in the HTTP GET
I can use graph explorer to get the image, so I know the link is correct. I have created an app with permissions in Azure as shown here
Am I missing a permission or something else?
Are you able to perform the same HTTP request on your machine using some tool like Postman?
Sometimes I have timeout issues with Microsoft Flow HTTP requests due to issues with IP whitelisting. Flow uses different IPs you can check it here and you may need to whitelist it first.
Related
I have to get data as json from a page. But my issue is that you need to be authenticated to the site to be able to see the page. I have an account on the site and I would like to know how to make the authentication or bypass this to be able to make my request, for the moment I have
urllib.error.HTTPError: HTTP Error 403
And here is the code I've made
import urllib.request, json
url = "https://intra.epitech.eu/planning/"
json_url = urllib.request.urlopen(url)
data = json.loads(json_url.read())
print(data)
The epitech intranet gives access to data only if you are logged in with your epitech account (i'm currently a epitech student building an app linked to the intra).
if you are not logged in to the intra you will get a 403 error (the one you have).
to connect to the intra with your account, you either need to use a autologin link (you can generate one in your intra settings) or register a azure active directory app to be able to log in with office365.
Probably you should use API of this website to get protected data. The fact you have an account does not allows you to get data programmatically.
I am trying to use Blueprism to download pdf files from Sharepoint.
I am using the below code. Url and Path are both variables which get passed through. This is producing a 403 forbidden error. I believe that Blueprism is required to pass credentials to Sharepoint before it will be allowed to download the file. Is this possible?
Using wc As New System.Net.WebClient()
wc.DownloadFile(Url, Path)
End Using
I don't think you have a password related issue, likely the SharePoint is recognising your account access via AD group or SSO of some kind. 403 means the server has understood your request but is denying to fulfil it because of an access reason on the profile you have. Make sure you can manually download the file on the profile you are emulating for a start then also check the profile the bot is operating under (not necessarily yours in some cases ) has access to said file.
Literally 403 is a request that relates to an access issue so somewhere something doesn't have the correct access lined up
First of all, is this a Sharepoint Online or OnPremises version? As you understand, you are connecting to web resource via an API and as such you have to get authenticated and authorized to access those resources.
If it's SPO, you can use the API component for SharePoint integration from DX and configure.
In case of SP On prem, you have to customize a lot to achieve your results.
I am new to both Azure ActiveDirectory as well as Power Bi Embedded.
I have an ASP.net WebForms app that I would like to display some PowerBi Reports in. When I authenticate interactively, all works well, I get my token and am able to access my report. (Follwing the excellent examples found on GitHub) These examples are interactive logins and use the AcquireTokenByAuthorizationCode() method.
However, I don't want my users to have to create / login with any account, just want to render the report for their consumption.
So I have setup a ClientCredential (cc) with my clientID and clientSecret. Am using this with the AquireToken method thusly:
token = AC.AcquireToken("https://analysis.windows.net/powerbi/api",cc).AccessToken;
This successfully gets me a token, however, when I add that to the request header:
request.Headers.Add("Authorization", String.Format("Bearer {0}", accessToken.Value));
The Response always fails with a "403 Forbidden" error at:
using (var response = request.GetResponse() as System.Net.HttpWebResponse)
{}
I've looked at other examples, many are using the async methods to aquire a token, which I am not.
Can anyone advise on how I can get past these 403 errors so I can simply serve up reports to my users (I don't want to publish them publicly, due to security concerns).
Thank you kindly in advance!
Doh, I was doing it wrong! Azure Login is not necessarily required to embed reports securely. The 3rd link below is included because my app is not MVC but WebForms, and Mr. Mikami shared a nice code sample which I tweaked to help me achieve my goal.
For anyone else looking to use Power Bi Embedded to embed reports, and authenticate non-interactively, these 3 links helped get me there.
Get started with Microsoft Power BI Embedded
Get started with Power BI Embedded sample
Power BI Embedded using Web Forms and Row Level Security
I am trying out the Azure AD-B2C. The user signup/sign in is fine when the MFA is turned off. But when I turn it on, and the user tries to sign in and provides the phone number, and requests a text message by clicking "send code", I get the Http 400 error: size of request headers is too long. Anybody else have this issue?
The error HTTP 400: Size of header request is too long generally happens because there's too many cookies.
Azure AD B2C's login goes through login.microsoftonline.com, as does almost every Microsoft service (O365, Azure, etc). So if you've got several accounts that you've signed in to across these services, you're accumulating cookies that will cause this problem.
Clearing the cookies should resolve this problem. If this is happening on a recurring basis, you should edit your question to include details about the request and cookies in order to best figure out what's bloating the request and how to reduce it.
Short answer: The file with the custom UI was not found by Microsoft login service. After getting shipped around it resulted in the error.
I had the same error with AAD B2C but "cookies" was not the problem. In my case I got the error while testing in the Azure B2C portal checking the policies and the custom UI pages. We use Azure Blob storage to hold custom login setup, its fast and it scales without our attention. The problem was found by using my test website using the B2C service. I put a stop/break on the Account controller's "public Task OnRemoteFailure(RemoteFailureContext context)" method. The debugger message gave me the full context of the error, an http 404 error and it gave the file name it was trying to find. Blob storage is case sensitive. The setup configuration used to configure B2C has camelCase names. The group who created the actual UI customization uses all lower case names. It took someone with access to all the assets to find the simple case name issue. Errors in distributed systems can be difficult.
I am trying to query the feed of a Facebook group page using Microsoft Power Query.
This particular query requires an access token. I have tried it out successfully in Facebook's Graph API Explorer, however it seems that Power Query does not include the access token when querying the Facebook Graph API. Thus Power Query is returning the "[DataSource.Error] The returned value has no columns." message. Any ideas on how to include\refresh the access token within Excel?
Power Query absolutely does include the access token when using the Facebook Graph API. However, the set of queries that Facebook allows us to run is considerably smaller than what you can do via the API explorer. This is probably why you don't get any data.
I find that the best way to explore or troubleshoot this kind of issue is to use a tool like Fiddler to see the network traffic as the requests are made.