我已经阅读了 Azure 的个人资料照片获取 API,并注意到如果用户的邮箱不可用,我们将无法在 v1.0 和 beta 中使用以下 API 来获取照片
{ "error": { "code": "ErrorEntityNotFound", "message": "Exception of type 'Microsoft.Fast.Profile.Core.Exception.ImageNotFoundException' was thrown.", "innerError": { "date": "2024-03-11T15:12:51", "request-id": "b99d40f8-45b3-448f-ac11-c981a4208fd1", "client-request-id": "b99d40f8-45b3-448f-ac11-c981a4208fd1" } } }
还有其他方法可以获取每个用户在 AAD 中上传的个人资料照片吗?
如果您在尝试执行以下操作时收到错误 Microsoft.Fast.Profile.Core.Exception.ImageNotFoundException 通过 Graph API(或 Set-MgUserPhotoContent)更新用户照片,确保使用 UserID 而不是 UPN (UserPrincipalName) 作为参数来识别用户
我遇到了完全相同的问题,只是针对没有邮箱的用户。 当我从 UPN 切换到 UserId 时,它适用于所有用户