Discussions
Power Query Editor (Power BI / Excel) gives 401 unauthorized error
Dear Personio-Dev community,
I can authenticate with my client ID & secret to get the token for my second request to get the employee data. With the second request where I insert the token from the first request in the header, I get an unauthorized error, but only in the Power Query Editor in Power BI Dataflows & Desktop as well as Excel. If I take this token and try it with Postman, it goes through, and I receive a response.
This is the error message in the Power Query diagnosis details:
Exception:
ExceptionType: System.Net.WebException, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message: The remote server returned an error: (401) Unauthorized.
StackTrace:
at Microsoft.Mashup.Engine1.Library.Http.WrappingHttpWebRequest.WrapExceptionResponse[T](Func1 getValue) at Microsoft.Mashup.Engine1.Library.Http.WebRequestFactory.TlsSniffingWebRequest.GetResponse() at Microsoft.Mashup.Engine1.Library.Http.Request.CreateResponse(ResourceCredentialCollection credentials) at Microsoft.Mashup.Engine1.Library.Http.Request.GetResponseCore(ResourceCredentialCollection credentials) at Microsoft.Mashup.Engine1.Library.Http.RetryPolicy.Execute[TResult](IEngineHost host, Func
1 func)
at Microsoft.Mashup.Engine1.Library.Http.Request.GetResponse(ResourceCredentialCollection credentials, RetryPolicy retryPolicy, SecurityExceptionCreator securityExceptionCreator, Boolean tokenRefreshed)