question

brandon@uprootstudios.com avatar image
brandon@uprootstudios.com asked

Unable to update API Policy through API

Hi, I maintain an admin tool for PlayFab, and one of the functionalities is to update a user's API policy through the UpdatePolicy API call. Recently, however, any calls to this endpoint return the error:

"0 is not allowed as a policy version. Make sure to merge PolicyVersion and Statements returned by GetPolicy with this request."

No changes have been made to my codebase in over a year, so it seems to definitely be on PlayFab's end unless there was a breaking change recently and I need to update the SDK I'm using.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Ivan Cai avatar image
Ivan Cai answered

We added the property "PolicyVersion" to the API GetPolicy and UpdatePolicy.If you use the c# sdk, you can modify c# sdk code to fix it. For specific steps, please refer to Cannot change API policy - Playfab Community.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

JayZuo avatar image JayZuo ♦ commented ·

PlayFab CSharpSdk has been updated to support "PolicyVersion". Please update to version 210406 or later to use it.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.