Can't see users, invited or not for my static web app
I have a static web app site that I've created and am using built in authentication. I have 2 users that are currently registered and able to use the app from AAD. However, I can't see them from the REST API https://learn.microsoft.com/en-us/rest/api/appservice/static-sites/list-static-site-users?tabs=HTTP&tryIt=true&source=docs#code-try-0 or the Azure CLI using #az staticwebapp users list -n <appname>
This issue continues today. Time does not appear to have solved this, so it is not a propagation of data issue.
AustinModelski-2618, I have tested this, and both approaches work. Just to highlight, I tested this with azure-cli version 2.42.0, though some earlier versions would work as well.
The REST API link that you shared, it returns http 200 instead of an error. To isolate, kindly see if (feasible) the same behavior occurs with other static webapp resource that you may.
To investigate this further, if it's fine, please share the resource uri of the Static Web App and UTC date&time of the issue occurring/your test.
Note: Kindly do not share any PII data on the public forums.
I get a 200 response from the REST API as well. But it and the CLI both return blank array. Am I missing something on actually seeing the list? The hope is that I can run this query or something like it to find the e-mail addresses from each of my users so I can send them notifications.
I think the issue is somewhere with my configuration and that it is making me run into an issue that was not intended. My current authentication is set to use the normal built in aad login. It is not connected to any b2c or anything like that. And it is not set to any kind of custom or limited to any domain. I'm wondering if that is the issue, as the email info and that stuff is not stored in anything my site owns, it is only connected when the user is logged in and shared from whatever that provider is at the time. But once they are not longer logged in, that connection is severed and the data not available. And because of this, there are no users within MY service, as they are all external users registered elsewhere. Does that sound possible?
I'm thinking the fix is that I create an ADB2C domain and then set up my app to point to that. Then I get all of the normal AD controls for the data and don't need to depend on whatever the basic level authentication from the static web app is.
From the initial investigations with the information you'd shared, It looks like you are making the right request. Eg: /subscriptions/xxxxx8/resourceGroups/xxxxxders/providers/Microsoft.Web/staticSites/xxxders/authproviders/all/listUsers?api-version=2022-03-01
and I don't see any configuration that would interfere with built-in auth (eg. no custom auth). I believe the list of users shows up fine in the Role Management blade in the portal.
I'm checking on this further and discussing internally, and will get back shortly.
Austin, to keep you informed. While I'm still working with our product team on this. Could you please confirm, if the list of users shows up fine in the Role Management blade in the Azure portal?
Sign in to comment