Skip to main content
API Reference NSDK NSDKSitesSession

requestSelfOrganizationInfo

Requests organizations for the current authenticated session and waits for the result....

Declaration

func requestSelfOrganizationInfo(pollingInterval: TimeInterval = 0.5, timeout: TimeInterval = 60.0) async throws -> OrganizationResult

Summary

Requests organizations for the current authenticated session and waits for the result.
- Parameters:
- pollingInterval: The interval between status checks (default: 0.5 seconds).
- timeout: Maximum time to wait for completion (default: 60 seconds).
- Returns: An OrganizationResult containing the organizations.
- Throws:
- CancellationError if the Task running this function was cancelled.
- TimeoutError if the function timed out before it could complete execution.
- SitesResult.Error if there was an error specific to the network query.
- NSDKError.invalidOperation if no access token was available.