    struct UserScopedPermissionsController

    extension UserScopedPermissionsController : Sendable, SendableMetatype

A Controller class for interacting with user-scoped permissions.
- `


  ### [requestOfflineAccess()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/UserScopedPermissionsController#/s:13GoogleHomeSDK31UserScopedPermissionsControllerV20requestOfflineAccessSSSgyYaF)


  ` Requests an offline access code from the authorization service, if configured with a server
  client ID.

  #### Declaration

  Swift

      func requestOfflineAccess() async -> String?

  #### Return Value

  The offline access code, or `nil` if the request failed.
- `


  ### [presentPermissionsUpdate()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/UserScopedPermissionsController#/s:13GoogleHomeSDK31UserScopedPermissionsControllerV07presentF6UpdateyyYaF)


  ` Presents a view for users to update the permissions granted to the Home SDK.

  #### Declaration

  Swift

      func presentPermissionsUpdate() async

- `


  ### [presentPermissionsUpdate(structureID:allowedStructureIDs:allowStructureChange:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/UserScopedPermissionsController#/s:13GoogleHomeSDK31UserScopedPermissionsControllerV07presentF6Update11structureID19allowedStructureIDs05allowM6ChangeySSSg_SaySSGSgSbSgtYaKF)


  ` Presents a view for users to update the permissions granted to the Home SDK.

  #### Declaration

  Swift

      func presentPermissionsUpdate(structureID: String? = nil, allowedStructureIDs: [String]? = nil, allowStructureChange: Bool? = nil) async throws

  #### Parameters

  |---|---|
  | ` structureID ` | An optional HGS ID of the structure to be pre-selected. |
  | ` allowedStructureIDs ` | An optional list of HGS structure IDs to which the user's choice should be restricted. |
  | ` allowStructureChange ` | An optional Boolean indicating whether the user is allowed to select a different structure. Defaults to false. |

- `


  ### [presentPermissionsUpdate(invitationToken:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/UserScopedPermissionsController#/s:13GoogleHomeSDK31UserScopedPermissionsControllerV07presentF6Update15invitationTokenySS_tYaKF)


  ` Presents a view for users to update the permissions granted to the Home SDK.

  #### Declaration

  Swift

      func presentPermissionsUpdate(invitationToken: String) async throws

  #### Parameters

  |---|---|
  | ` invitationToken ` | A token used to accept an invitation to a structure. |

- `


  ### [authorization()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/UserScopedPermissionsController#/s:13GoogleHomeSDK31UserScopedPermissionsControllerV13authorizationSS11accessToken_10Foundation4DataV9assertiontyYaKF)


  ` Returns a current access token and assertion for the current user.
  Throws
  `HomeError.permissionDenied`

  #### Declaration

  Swift

      func authorization() async throws -> (accessToken: String, assertion: Data)