Exception of type 'Microsoft.Fast.Profile.Core.Exception.ProfileBadRequestException' was thrown

Matt Perry 80 Reputation points
2024-05-07T12:34:10.21+00:00

We've had a flow running in production for about a month now that updates associate images using the Graph. This week we are seeing issues where the Base64 image is throwing an error. Permissions haven't changed. We tried going directly through Graph Explorer but seeing the same error. I've validated that the image string is good using an online tool.

"code": "InvalidImage",
    "message": "Exception of type 'Microsoft.Fast.Profile.Core.Exception.ProfileBadRequestException' was thrown."
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,999 questions
{count} votes

Accepted answer
  1. Phinehas Bynum 85 Reputation points
    2024-07-17T19:22:42.7466667+00:00

    This has been a big pain for us, but we found a fix! If you don't base64 encode the image contents, you can use a content header of image/jpeg and a raw body of the image content and it works as it did before. In the past, we had to base64 encode the body. Thanks for the idea to try in Postman @Ivan, this is how we discovered the change. Fingers crossed that it doesn't break again. For those at Microsoft, pretty please document future changes to the Graph API 🫠!

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Admin - Carsten Isak Nielsen 0 Reputation points
    2024-06-04T07:23:14.7333333+00:00

    Yes another old issue that Microsoft is not going to fix, its been over a year since this occurred first time and its still there so would not hold my breath.

    See comments here from a year ago https://www.youtube.com/watch?v=GxY0RV5iGAY


  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.