Enrico1203 14 Posted March 24, 2025 Posted March 24, 2025 Hello, in the user policy on the web panel i see this: Allow this user to change their password and profile picture enabled by default. and i what to disable that using API call https://swagger.emby.media/?staticview=true#/UserService/postUsersByIdPolicy This specific toggle is missing from the swagger api. I've done some tests to get all names of user policy but i cant find this. {'Name': 'TEST', 'ServerId': 'cb7ea74d50214bfba68f54db354d0db9', 'Prefix': 'L', 'DateCreated': '2025-03-24T09:48:39.7008301Z', 'Id': '7a414f962e994aeb8b2b9edf7b1da5d9', 'HasPassword': True, 'HasConfiguredPassword': True, 'LastLoginDate': '2025-03-24T09:51:18.9304277Z', 'LastActivityDate': '2025-03-24T09:54:31.2035531Z', 'Configuration': {'PlayDefaultAudioTrack': True, 'DisplayMissingEpisodes': False, 'SubtitleMode': 'Smart', 'OrderedViews': [], 'LatestItemsExcludes': [], 'MyMediaExcludes': [], 'HidePlayedInLatest': True, 'HidePlayedInMoreLikeThis': False, 'HidePlayedInSuggestions': False, 'RememberAudioSelections': True, 'RememberSubtitleSelections': True, 'EnableNextEpisodeAutoPlay': True, 'ResumeRewindSeconds': 0, 'IntroSkipMode': 'ShowButton', 'EnableLocalPassword': False}, 'Policy': {'IsAdministrator': False, 'IsHidden': False, 'IsHiddenRemotely': True, 'IsHiddenFromUnusedDevices': False, 'IsDisabled': False, 'LockedOutDate': 0, 'AllowTagOrRating': False, 'BlockedTags': [], 'IsTagBlockingModeInclusive': False, 'IncludeTags': [], 'EnableUserPreferenceAccess': True, 'AccessSchedules': [], 'BlockUnratedItems': [], 'EnableRemoteControlOfOtherUsers': False, 'EnableSharedDeviceControl': True, 'EnableRemoteAccess': True, 'EnableLiveTvManagement': False, 'EnableLiveTvAccess': False, 'EnableMediaPlayback': True, 'EnableAudioPlaybackTranscoding': True, 'EnableVideoPlaybackTranscoding': True, 'EnablePlaybackRemuxing': True, 'EnableContentDeletion': False, 'RestrictedFeatures': [], 'EnableContentDeletionFromFolders': [], 'EnableContentDownloading': False, 'EnableSubtitleDownloading': False, 'EnableSubtitleManagement': False, 'EnableSyncTranscoding': False, 'EnableMediaConversion': False, 'EnabledChannels': [], 'EnableAllChannels': True, 'EnabledFolders': ['68d291478b054f86ab058c91dbb61bd4', '446b083a488b48e8ad0f6718b2d8d292', '6c6b02200cd14da4be65358b496a7a4e', '00a0947adf5a4c5b9500d715b852cced', '4313805e763e41ae90ee259691409663', '2258ff06b5f24fb894274d96f4983d5f', 'f317ab4b81214d058c440684f513b950', 'f317ab4b81214d058c440684f513b950', '546700714dc74e4982c0da54ba7c774a', '546700714dc74e4982c0da54ba7c774a', '307460bb45ab485c9f819e1b76008314', 'd24ed7b1fe2d467fac20a36c61250ebb'], 'EnableAllFolders': False, 'InvalidLoginAttemptCount': 0, 'EnablePublicSharing': True, 'RemoteClientBitrateLimit': 0, 'AuthenticationProviderId': 'Emby.Server.Implementations.Library.DefaultAuthenticationProvider', 'ExcludedSubFolders': ['a71c1990255c4fefb0ca06d3bd6234d6_1258212', 'a71c1990255c4fefb0ca06d3bd6234d6_840297'], 'SimultaneousStreamLimit': 1, 'EnabledDevices': [], 'EnableAllDevices': True, 'AllowCameraUpload': False, 'AllowSharingPersonalItems': False}, 'HasConfiguredEasyPassword': False} I was expectin something like: 'DisablePasswordPictureChange': False And make a POST call like this i made to Disable a specific user passing IsDisabled: True on the data def disable_user(server_ip, api_key, user_id url = f'{server_ip}/emby/Users/{user_id}/Policy' # Headers headers = { 'Content-Type': 'application/json', 'X-Emby-Token': api_key } data = { "IsDisabled": True } # POST response = requests.post(url, headers=headers, json=data)
Solution adminExitium 355 Posted March 24, 2025 Solution Posted March 24, 2025 Try the EnableUserPreferenceAccess setting. 1
Enrico1203 14 Posted March 24, 2025 Author Posted March 24, 2025 14 minutes ago, adminExitium said: EnableUserPreferenceAccess Thanks its working!. This is exactly what i was searching for @adminExitium The name had misled me. I thought it was something else
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now