久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何從MobileServiceUser獲取用戶名、郵箱等?

How to get user name, email, etc. from MobileServiceUser?(如何從MobileServiceUser獲取用戶名、郵箱等?)
本文介紹了如何從MobileServiceUser獲取用戶名、郵箱等?的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

限時(shí)送ChatGPT賬號(hào)..

經(jīng)過(guò)大量研究,我已經(jīng)讓我的 WPF 應(yīng)用程序通過(guò) Azure 移動(dòng)服務(wù)登錄用戶.我的移動(dòng)服務(wù)連接到我設(shè)置的 Azure Active Directory.但是,當(dāng)我使用 MobileServiceClient.LoginAsync(...) 登錄用戶時(shí),MobileServiceUser UserId 似乎處于不可讀的哈希中.例如,它看起來(lái)像:Aad:X3pvh6mmo2AgTyHdCA3Hwn6uBy91rXXXXXXXXXX".這究竟是什么?

After a lot of digging around I've got my WPF application signing users in via Azure Mobile Service. My Mobile Service is connected to an Azure Active Directory that I have set up. However, when I log the user in with MobileServiceClient.LoginAsync(...) the MobileServiceUser UserId is in an unreadable hash it seems. For example it looks like: "Aad:X3pvh6mmo2AgTyHdCA3Hwn6uBy91rXXXXXXXXXX". What exactly is this?

我想獲取用戶的顯示名稱以使用,但我不知道如何使用.

I'd like to grab the user's display name to use but I can't figure out how.

推薦答案

這是 Azure Active Directory 的用戶 ID.您需要?jiǎng)?chuàng)建一個(gè)服務(wù)來(lái)通過(guò)服務(wù)公開(kāi)您的 AAD 信息,并使用您從用戶那里獲得的訪問(wèn)令牌檢索附加信息.

That is the userID of Azure Active Directory. You need to create a service to expose your AAD info through a service and retrieve the additional information using the access token you get from your user.

第一:

    ServiceUser user = this.User as ServiceUser;
    var identities = await user.GetIdentitiesAsync();
    var aad = identities.OfType<AzureActiveDirectoryCredentials>().FirstOrDefault();
    var aadAccessToken = aad.AccessToken;
    var aadObjectId = aad.ObjectId;

這將為您提供訪問(wèn)令牌和 objectID ,然后您需要通過(guò) AAD 圖形 API 查詢信息.https://msdn.microsoft.com/library/azure/dn151678.aspx查看示例請(qǐng)求部分.您應(yīng)該向查詢提供您獲得的訪問(wèn)令牌和 objectId.

This will give you the access token and objectID , then you need to query the information through AAD graphy API. https://msdn.microsoft.com/library/azure/dn151678.aspx Look at the sample request part. You should provide the query with the access token you got and objectId.

這篇關(guān)于如何從MobileServiceUser獲取用戶名、郵箱等?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

ASP.NET Core authenticating with Azure Active Directory and persisting custom Claims across requests(ASP.NET Core 使用 Azure Active Directory 進(jìn)行身份驗(yàn)證并跨請(qǐng)求保留自定義聲明)
ASP.NET Core 2.0 Web API Azure Ad v2 Token Authorization not working(ASP.NET Core 2.0 Web API Azure Ad v2 令牌授權(quán)不起作用)
ASP Core Azure Active Directory Login use roles(ASP Core Azure Active Directory 登錄使用角色)
How do I get Azure AD OAuth2 Access Token and Refresh token for Daemon or Server to C# ASP.NET Web API(如何獲取守護(hù)進(jìn)程或服務(wù)器到 C# ASP.NET Web API 的 Azure AD OAuth2 訪問(wèn)令牌和刷新令牌) - IT屋-程序員軟件開(kāi)發(fā)技
.Net Core 2.0 - Get AAD access token to use with Microsoft Graph(.Net Core 2.0 - 獲取 AAD 訪問(wèn)令牌以與 Microsoft Graph 一起使用)
Azure KeyVault Active Directory AcquireTokenAsync timeout when called asynchronously(異步調(diào)用時(shí) Azure KeyVault Active Directory AcquireTokenAsync 超時(shí))
主站蜘蛛池模板: 亚洲图片一区二区三区 | 蜜桃视频一区二区三区 | 天天操夜夜艹 | 欧美日韩中文字幕在线播放 | 婷婷亚洲综合 | 国产一级在线 | 国产精品一区二区精品 | 亚洲欧美视频 | 亚洲精品乱码久久久久久按摩观 | 国产伦精品一区二区三区精品视频 | 一区二区三区av | 亚洲国产黄 | 在线视频一区二区 | 国产精品视频在线播放 | 精品在线观看一区 | 成人av观看 | 日本久草视频 | 欧美精品片 | 色在线免费| 成人av免费在线观看 | 久久99这里只有精品 | 亚洲午夜精品一区二区三区他趣 | 久久久精彩视频 | 99久久婷婷国产精品综合 | 精品一二三区视频 | 日韩视频在线观看中文字幕 | 国产视频久久 | 精品国产乱码久久久久久图片 | 91免费高清视频 | www.欧美 | 日韩电影免费在线观看中文字幕 | 国产精品一区二区三区久久久 | 91视频久久久久 | 国产精品夜间视频香蕉 | 精品久草 | 亚洲自拍偷拍免费视频 | 91免费福利视频 | 麻豆久久久久久久 | 在线一级片 | 日韩一区在线播放 | 激情自拍偷拍 |