Skip to content

Instantly share code, notes, and snippets.

@yuchung-chuang
Last active April 26, 2020 15:10
Show Gist options
  • Save yuchung-chuang/edc3196a10f956562ced2cfe9e5d03ed to your computer and use it in GitHub Desktop.
Save yuchung-chuang/edc3196a10f956562ced2cfe9e5d03ed to your computer and use it in GitHub Desktop.
GraphManager.instance.getMe { completion:
(user: MSGraphUser?, error: Error?) in
DispatchQueue.main.async {
guard let currentUser = user, error == nil else {
// Failed to get user
print("Error getting user: \(String(describing: error))")
return
}
// Got user information in "currentUser" successfully
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment