Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
AadHttpClient - User login is required #1810
Expected or Desired Behavior
After reading the articel https://docs.microsoft.com/de-de/sharepoint/dev/spfx/use-aad-tutorial I tried to implement the AadHttpClient to query the Azure AD. Everything works fine while development but now we try to set the solution to productive.
We get the following error at the browsers console window:
Steps to Reproduce
We extracted the Azure AD related functions into a seperate TypeScript-Class like the following:
The error occurs inside the following method while we trying to load users. The URL Parameter is filled with: https://graph.microsoft.com/beta/users?top=100&$filter=department eq 'BU-1' or Department eq 'BU-2'
Why we get the "User Login is required". I understood the AadHttpClient that it will handle the users Login process for me? Where is my mistake?
Have the same exact error message on my tenant. Only happens when the solution runs in production.
When debugging in workbench, the login succeeds automatically from the first page load. No error message.
We also get the
We use the AadHttpClient for calls to MS Office Graph, to our own REST API and a third party API. It's not clear, when we get this error, as sometimes it works and sometimes it doesn't.
Some additional information:
From our understanding it looks like a bug in SP/SPFx as sometimes it works and sometimes it doesn't.
For us this is a very important functionality as we rely strongly on Azure-hosted APIs and cannot accept functionality that does not work in a reliable manor.
Do you have any information on
In case you have further questions or need some more technical details, please contact me. Thanks!
I've found that if you have more than one pending request in the Preview SharePoint Admin centre > API Management - you may have more than one permission request for the same thing, try to approve them, if you get an error, reject them. I saw this behaviour with the new PnP Starter Kit.
@waldekmastykarz while our first try's we got some other errors (propably our own mistakes) with the MSGraphClient... today I'm not remembering which errors but we were not able to handle them and so we decided to switch the the AadHttpClient which seems to wook correct...
It should be working without the semaphore. Are you still seeing issues?…
On Tue, Jun 12, 2018, 12:47 AM vocaris ***@***.***> wrote: It seams to be working but with the issue #1934 <#1934> Nasicus explained. So we implement the Semaphore <https://github.com/abrkn/semaphore.js/blob/master/lib/semaphore.js> and everything is fine... — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#1810 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AHBvHL1W9EDyubpnZ3gan1dKGVCAyF3-ks5t73HtgaJpZM4T2Ltu> .