Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hi!
I'm tryning to extract an Excel archieve received as a url in my outlook using Power Query. I already managed to extract the link in the body of the email and create a new column containing the link. But when I try to get the file from the link I'm redirected to the Microsoft Online login page to log in my Copaign Page. The method of authentication is SAML2. How can i do this steps into power query?
This is my step code: #"Carregar Planilha" = Table.AddColumn(#"Remover Colunas", "DadosPlanilha", each Excel.Workbook(Web.Contents([Link.Anexo]), null, true), type table)
I've informed the TOKEN and BI retorned the error message bellow:
(After run de code, I had to inform my microsoft online login and username)
Expression.Error: The 'AccountLoginName' header is only supported when connecting anonymously. These headers can be used with all authentication types: Accept, Accept-Charset, Accept-Encoding, Accept-Language, Cache-Control, Content-Type, If-Modified-Since, Prefer, Referer
Hi @CESAR_OLIVEIRA9 ,
You’ve already extracted the link from the email body and created a new column. Great job!
Now, let’s modify your existing step to include the access token:
#"Carregar Planilha" = Table.AddColumn(
#"Remover Colunas",
"DadosPlanilha",
each Excel.Workbook(
Web.Contents([Link.Anexo], [Headers=[Authorization="Bearer YOUR_ACCESS_TOKEN"]]),
null,
true
),
type table
)
Replace YOUR_ACCESS_TOKEN with the actual access token you obtained during authentication.
Similar post:
Solved: How to pull data from Web API into PowerBI using A... - Microsoft Fabric Community
By the way, the token will expire within a certain period of time, so be prepared.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
23 | |
11 | |
10 | |
10 | |
9 |