Disable site sharing in Office 365 using CSOM
I have a requirement to disable sharing of sites and documents in Office 365 site collection using CSOM.
Manually from UI, I can disable sharing by unchecking Access Request Settings under Site Settings.
But could not find a way to do it using CSOM.
Hi,
If it is an on premises environment, there is a property “RequestAccessEnabled” in SPWeb class in SharePoint Object Model can be used to change the
setting:
https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.requestaccessenabled.aspx
However, in an online environment, the SharePoint Object Model is not an option, what’s more, in Client Object Model which is designed for client side use, there is
no such a property in Web class available:
https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.web_members.aspx
It means that it is not able to change the “Access Request Settings” with the client side technology such as JavaScript.
Thus, I would suggest you submit a feedback to the Office Developer Platform if there any expectation about the future version of Office 365:
http://officespdev.uservoice.com/
It
is a place for customers provide feedback about Microsoft Office products. What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft
Product Team will take it into consideration when designing the next version in the future.
Best regards
Patrick Liang
TechNet Community Support
Similar Messages
-
How to download a file version from office 365 using csom
I need to download an older file version from office 365 and get the data into a byte array. I have no trouble downloading the latest version with File.OpenBinaryStream() and I have no trouble loading the previous file versions with File.Versions. But now
I need to actually download an older version of the file and it seems the only way is to use File.OpenBinaryDirect. So I am creating a client context using my oAuth access token and providing the correct path, but I am getting a (401) Unauthorized
error. Looking with Fiddler I can see that the call to OpenBinaryDirect is somehow trying to post to my file URL and the server is responding with 401.
context = TokenHelper.GetClientContextWithAccessToken(SPHostUrl, AccessToken);
FileInformation info = File.OpenBinaryDirect(context, "/" + _fileVersion.Url); //throws 401
//leading slash required otherwise ArgumentOutOfRangeException
I have to be able to access the older file versions with my c# code -- I don't have a viable app without that ability -- any help urgently needed and greatly appreciated!Thank you SO much (Can't wait for the next release)!
For anyone else who lands here, here's the code I ended up using:
// VersionAccessUser and VersionAccessPassword are stored in web.config
// web.Url is loaded via the clientContext
// myVersion is the FileVersion I got from the file's Versions.GetById() method
// probably a lot of ways to get hostUrl, it just needs to be https://yourdomain.sharepoint.com/
// - I'm running my app from a subweb
// I had trouble following the links to get the full MsOnlineClaimsHelper code
// (the one on msdn.com was missing RequestBodyWriter, WSTrustFeb2005ContractClient,
// and IWSTrustFeb2005Contract
// so I've included the code I used here.
string myVersionFullUrl = string.Format("{0}/{1}", web.Url, myVersion.Url);
string userName = WebConfigurationManager.AppSettings.Get("VersionAccessUser");
string strPassword = WebConfigurationManager.AppSettings.Get("VersionAccessPassword");
string hostUrl = Regex.Replace(web.Url, "([^/]+//[^/]+/).*", "$1");
MsOnlineClaimsHelper claimsHelper = new MsOnlineClaimsHelper(hostUrl, userName, strPassword);
var client = new WebClient();
client.Headers["Accept"] = "/";
client.Headers.Add(HttpRequestHeader.UserAgent, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
client.Headers.Add(HttpRequestHeader.Cookie, claimsHelper.CookieContainer.GetCookieHeader(new Uri(hostUrl)));
var document = client.DownloadString(myVersionFullUrl);
// These classes are needed to download old versions of files (see: http://social.msdn.microsoft.com/Forums/en-US/7746d857-d351-49cc-b2f0-496663239e02/how-to-download-a-file-version-from-office-365-using-csom?forum=sharepointdevelopment)
// I cobbled this file from http://social.technet.microsoft.com/Forums/msonline/en-US/4e304493-7ddd-4721-8f46-cb7875078f8b/problem-logging-in-to-office-365-sharepoint-online-from-webole-hosted-in-the-cloud?forum=onlineservicessharepoint
// and http://fredericloud.com/2011/01/11/connecting-to-sharepoint-with-claims-authentication/
using Microsoft.IdentityModel.Protocols.WSTrust;
using Microsoft.SharePoint.Client;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Security;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.Text;
using System.Web;
using System.Xml;
using System.Xml.Linq;
namespace DPSiDoxAppWeb.Helpers
/// <summary>
/// Create a new contract to use for issue claims for the SharePoint requests
/// </summary>
[ServiceContract]
public interface IWSTrustFeb2005Contract
[OperationContract(ProtectionLevel = ProtectionLevel.EncryptAndSign,
Action = "http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue",
ReplyAction = "http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Issue",
AsyncPattern = true)]
IAsyncResult BeginIssue(Message request, AsyncCallback callback, object state);
Message EndIssue(IAsyncResult asyncResult);
/// <summary>
/// Implement the client contract for the new type
/// </summary>
public class WSTrustFeb2005ContractClient : ClientBase<IWSTrustFeb2005Contract>, IWSTrustFeb2005Contract
public WSTrustFeb2005ContractClient(Binding binding, EndpointAddress remoteAddress)
: base(binding, remoteAddress)
public IAsyncResult BeginIssue(Message request, AsyncCallback callback, object state)
return Channel.BeginIssue(request, callback, state);
public Message EndIssue(IAsyncResult asyncResult)
return Channel.EndIssue(asyncResult);
/// <summary>
/// Create a class that will serialize the token into the request
/// </summary>
class RequestBodyWriter : BodyWriter
readonly WSTrustRequestSerializer _serializer;
readonly RequestSecurityToken _rst;
/// <summary>
/// Constructs the Body Writer.
/// </summary>
/// <param name="serializer">Serializer to use for serializing the rst.</param>
/// <param name="rst">The RequestSecurityToken object to be serialized to the outgoing Message.</param>
public RequestBodyWriter(WSTrustRequestSerializer serializer, RequestSecurityToken rst)
: base(false)
if (serializer == null)
throw new ArgumentNullException("serializer");
_serializer = serializer;
_rst = rst;
/// <summary>
/// Override of the base class method. Serializes the rst to the outgoing stream.
/// </summary>
/// <param name="writer">Writer to which the rst should be written.</param>
protected override void OnWriteBodyContents(XmlDictionaryWriter writer)
_serializer.WriteXml(_rst, writer, new WSTrustSerializationContext());
public class MsOnlineClaimsHelper
#region Properties
readonly string _username;
readonly string _password;
readonly bool _useRtfa;
readonly Uri _host;
CookieContainer _cachedCookieContainer = null;
DateTime _expires = DateTime.MinValue;
#endregion
#region Constructors
public MsOnlineClaimsHelper(string host, string username, string password)
: this(new Uri(host), username, password)
public MsOnlineClaimsHelper(Uri host, string username, string password)
_host = host;
_username = username;
_password = password;
_useRtfa = true;
public MsOnlineClaimsHelper(Uri host, string username, string password, bool useRtfa)
_host = host;
_username = username;
_password = password;
_useRtfa = useRtfa;
#endregion
#region Constants
public const string office365STS = "https://login.microsoftonline.com/extSTS.srf";
public const string office365Login = "https://login.microsoftonline.com/login.srf";
public const string office365Metadata = "https://nexus.microsoftonline-p.com/federationmetadata/2007-06/federationmetadata.xml";
public const string wsse = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
public const string wsu = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
private const string userAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)";
#endregion
class MsoCookies
public string FedAuth { get; set; }
public string rtFa { get; set; }
public DateTime Expires { get; set; }
public Uri Host { get; set; }
// Method used to add cookies to CSOM
public void clientContext_ExecutingWebRequest(object sender, WebRequestEventArgs e)
e.WebRequestExecutor.WebRequest.CookieContainer = getCookieContainer();
//e.WebRequestExecutor.WebRequest.UserAgent = userAgent;
// Creates or loads cached cookie container
CookieContainer getCookieContainer()
if (_cachedCookieContainer == null || DateTime.Now > _expires)
// Get the SAML tokens from SPO STS (via MSO STS) using fed auth passive approach
MsoCookies cookies = getSamlToken();
if (cookies != null && !string.IsNullOrEmpty(cookies.FedAuth))
// Create cookie collection with the SAML token
_expires = cookies.Expires;
CookieContainer cc = new CookieContainer();
// Set the FedAuth cookie
Cookie samlAuth = new Cookie("FedAuth", cookies.FedAuth)
Expires = cookies.Expires,
Path = "/",
Secure = cookies.Host.Scheme == "https",
HttpOnly = true,
Domain = cookies.Host.Host
cc.Add(samlAuth);
if (_useRtfa)
// Set the rtFA (sign-out) cookie, added march 2011
Cookie rtFa = new Cookie("rtFA", cookies.rtFa)
Expires = cookies.Expires,
Path = "/",
Secure = cookies.Host.Scheme == "https",
HttpOnly = true,
Domain = cookies.Host.Host
cc.Add(rtFa);
_cachedCookieContainer = cc;
return cc;
return null;
return _cachedCookieContainer;
public CookieContainer CookieContainer
get
if (_cachedCookieContainer == null || DateTime.Now > _expires)
return getCookieContainer();
return _cachedCookieContainer;
private MsoCookies getSamlToken()
MsoCookies ret = new MsoCookies();
try
var sharepointSite = new
Wctx = office365Login,
Wreply = _host.GetLeftPart(UriPartial.Authority) + "/_forms/default.aspx?wa=wsignin1.0"
//get token from STS
string stsResponse = getResponse(office365STS, sharepointSite.Wreply);
// parse the token response
XDocument doc = XDocument.Parse(stsResponse);
// get the security token
var crypt = from result in doc.Descendants()
where result.Name == XName.Get("BinarySecurityToken", wsse)
select result;
// get the token expiration
var expires = from result in doc.Descendants()
where result.Name == XName.Get("Expires", wsu)
select result;
ret.Expires = Convert.ToDateTime(expires.First().Value);
HttpWebRequest request = createRequest(sharepointSite.Wreply);
byte[] data = Encoding.UTF8.GetBytes(crypt.FirstOrDefault().Value);
using (Stream stream = request.GetRequestStream())
stream.Write(data, 0, data.Length);
stream.Close();
using (HttpWebResponse webResponse = request.GetResponse() as HttpWebResponse)
// Handle redirect, added may 2011 for P-subscriptions
if (webResponse.StatusCode == HttpStatusCode.MovedPermanently)
HttpWebRequest request2 = createRequest(webResponse.Headers["Location"]);
using (Stream stream2 = request2.GetRequestStream())
stream2.Write(data, 0, data.Length);
stream2.Close();
using (HttpWebResponse webResponse2 = request2.GetResponse() as HttpWebResponse)
ret.FedAuth = webResponse2.Cookies["FedAuth"].Value;
ret.rtFa = webResponse2.Cookies["rtFa"].Value;
ret.Host = request2.RequestUri;
else
ret.FedAuth = webResponse.Cookies["FedAuth"].Value;
ret.rtFa = webResponse.Cookies["rtFa"].Value;
ret.Host = request.RequestUri;
catch (Exception ex)
return null;
return ret;
static HttpWebRequest createRequest(string url)
HttpWebRequest request = HttpWebRequest.Create(url) as HttpWebRequest;
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.CookieContainer = new CookieContainer();
request.AllowAutoRedirect = false; // Do NOT automatically redirect
request.UserAgent = userAgent;
return request;
private string getResponse(string stsUrl, string realm)
RequestSecurityToken rst = new RequestSecurityToken
RequestType = WSTrustFeb2005Constants.RequestTypes.Issue,
AppliesTo = new EndpointAddress(realm),
KeyType = WSTrustFeb2005Constants.KeyTypes.Bearer,
TokenType = Microsoft.IdentityModel.Tokens.SecurityTokenTypes.Saml11TokenProfile11
WSTrustFeb2005RequestSerializer trustSerializer = new WSTrustFeb2005RequestSerializer();
WSHttpBinding binding = new WSHttpBinding();
binding.Security.Mode = SecurityMode.TransportWithMessageCredential;
binding.Security.Message.ClientCredentialType = MessageCredentialType.UserName;
binding.Security.Message.EstablishSecurityContext = false;
binding.Security.Message.NegotiateServiceCredential = false;
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
EndpointAddress address = new EndpointAddress(stsUrl);
using (WSTrustFeb2005ContractClient trustClient = new WSTrustFeb2005ContractClient(binding, address))
trustClient.ClientCredentials.UserName.UserName = _username;
trustClient.ClientCredentials.UserName.Password = _password;
Message response = trustClient.EndIssue(
trustClient.BeginIssue(
Message.CreateMessage(
MessageVersion.Default,
WSTrustFeb2005Constants.Actions.Issue,
new RequestBodyWriter(trustSerializer, rst)
null,
null));
trustClient.Close();
using (XmlDictionaryReader reader = response.GetReaderAtBodyContents())
return reader.ReadOuterXml(); -
How to show content of a list which resides in other site collection in Office 365?
Hi All,
Can anyone help on How to show content of a list which resides in other site collection in Office 365 . Using Rest and Soap services this is not possible as we have limitations in office 365.So if anyone have any idea please let me know.
Note : We are not allowed to use CSOM for this requirement.
Many Thanks,
Vinod.Hi Vinod,
You can use cross site publishing feature of SharePoint 2013.
http://blogs.msdn.com/b/justinvoels/archive/2012/09/24/sharepoint-2013-search-driven-publishing-and-cross_2d00_site-collection-publishing-overview.aspx
https://technet.microsoft.com/en-us/library/jj635883.aspx
Alternative to cross-site publishing in SP Online
https://www.youtube.com/watch?v=chwHhEmIERg
Best Regards,
Brij K
http://bloggerbrij.blogspot.co.uk/ -
Custom Site MailBox for Office 365 SharePoint 2013 online
Is it possible to create programmatically create site mailbox for Office 365 SharePoint 2013 online?
How to customize site mailbox email address like [email protected]Hi,
In SharePoint 2013 Online, if you want to sync document library with local drive, you can use OneDrive to achieve it.
http://office.microsoft.com/en-001/support/sync-onedrive-for-business-or-sharepoint-site-libraries-to-your-computer-HA102832401.aspx
Best Regards
Dennis Guo
TechNet Community Support -
How to Get user profile properties in provider -cloud hosted app in sharepoint online - office 365 using REST API?
any idea?Hi,
From your description, my understanding is that you want to get user profile properties in provider-hosted app in SharePoint online using REST API.
Here is sample code for getting user profile properties:
http://www.vrdmn.com/2013/07/sharepoint-2013-get-userprofile.html
Here is a blog below about accessing data from the provider-host apps:
http://dannyjessee.com/blog/index.php/2014/07/accessing-sharepoint-data-from-provider-hosted-apps-use-the-right-context/
Best Regards,
Vincent Han
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Error in migrating SharePoint 2010 list fields to Office 365 list [CSOM]
Hi,
I am trying to migrate a SharePoint 2010 list to Office 365. I created a new ListCreationInfo for a new list in O365. But when i am to trying add fields from SP2010 list, its giving me an error after list.update() -
A duplicate field name "fa564e0f-0c70-4ab9-b863-0177e6ddd247" was found.
if (!l.Hidden)
ListCreationInformation creationInfo = new ListCreationInformation();
creationInfo.Title = l.Title;
creationInfo.TemplateType = l.BaseTemplate;
List list = web.Lists.Add(creationInfo);
//Fields in the list
ctxOnPrem.Load(l.Fields);
ctxOnPrem.ExecuteQuery();
foreach (Field f in l.Fields)
list.Fields.AddFieldAsXml(f.SchemaXml, true, AddFieldOptions.DefaultValue); list.Update();
Note- l is the SharePoint 2010 List.Answer given on StackExchange -
http://sharepoint.stackexchange.com/questions/128875/error-in-migrating-sharepoint-2010-list-fields-to-office-365-list-csom/129015#129015
Thanks,
Thomas -
Cannot connect to Office 365 using Powershell on Windows 7 SP1
Hi,
I was trying to connect to Office 365 using windows azure active directory module for Windows Powershell.
$Cred = Get-Credential
Connect-MsolService -Credential $cred
It failed on my windows 7 machine with the error
Connect-MsolService : Unable to authenticate your credentials. Make sure that your user name is
in the format: <username>@<domain>. If this issue persists, contact support.
This issue happened in Windows 7 SP1 OS.
But, when I tried the same thing on a Windows 2008 R2 VM, it connected successfully.
This means that the account I was trying to login does have the permissions.
Both the machines ( windows 7 and windows server 2008 R2) have the following pre-requisites installed:
Install Microsoft Online Services Sign-in Assistant: http://www.microsoft.com/en-us/download/details.aspx?id=39267
Windows Azure Active Directory Module for Windows PowerShell (64-bit version)
I checked for other settings needed for this to work at :
(Though these settings are for Windows 8, I have all these settings in Windows 7 as well)
http://community.spiceworks.com/how_to/show/45453-how-to-prepare-a-windows-8-64-bit-pc-to-manage-windows-azure-ad-office-365-using-windows-powershell
Can someone please tell what is going wrong on my Windows 7 SP1 environment.
Thanks,
Gagan
GaganHi,
Have you install installed .NET Framework 4.5 and Windows Management Framework 3.0 on Windows 7 Service Pack 1 (SP1)?
Please go through the below article to know more about what is the requirements to Connect to Exchange Online Using Remote PowerShell:
http://technet.microsoft.com/en-us/library/jj984289(v=exchg.150).aspx
In addition that, hope the below link be helpful:
Connect-MsolService : Unable to authenticate your credentials. (Wrong WebServiceUrl value in Registry)
http://jesperstahle.azurewebsites.net/?p=42
Regards,
Yan Li
Regards, Yan Li -
How to disable the "Site" button in office 365???
I would like to make the button "sites" in office 365
invisible .
Someone who knows how to build
it out in sharepointdesigner????Check out the
SuiteLinksDelegate Delegate Control in link below
http://zimmergren.net/technical/sp-2013-some-new-delegatecontrol-additions-to-the-sharepoint-2013-master-pages -
Hi,
I need to create a form in SharePoint designer so that it can display and save selected users. Users should be selected for particular group. Group and users are in AD. Form would look like below:-
Group1 People picker with users of Group1 only
Group2
People picker with users of Group2 only
Save button to save this mapping in some List for selected users and groups
I need to do this using CSOM/Javascript in office 365.
Thanks a lot!
Arvind
arvind chamoliHi Venu,
check those options
http://www.thesharepointblog.net/Lists/Posts/Post.aspx?List=815f255a-d0ef-4258-be2a-28487dc9975c&ID=135
http://paultavares.wordpress.com/2012/04/28/sharepoint-ui-widgets-upload-and-pickusers/
http://spservices.codeplex.com/wikipage?title=Users%20and%20Groups&referringTitle=%24%28%29.SPServices
http://spservices.codeplex.com/wikipage?title=UserProfileService&referringTitle=%24%28%29.SPServices
http://blog.vgrem.com/2013/03/27/different-ways-of-extending-people-editor-in-the-client-side-sharepoint-2010/
this one for 2013 but worth that u check it
http://msdn.microsoft.com/en-us/library/office/jj713593(v=office.14).aspx
Kind Regards, John Naguib Technical Consultant/Architect MCITP, MCPD, MCTS, MCT, TOGAF 9 Foundation. Please remember to mark the reply as answer if it helps. -
How to update Office 365 using SCCM 2012 R2?
Hi,
I am using SCCM 2012 R2 and Office 365 ProPlus.
At products list (Software Update Point Components Properties) there is not Office 365.
Office 365 automatically updates from Internet.
I need to know the following:
How to disable Internet automatic updates at Office 365
How to deploy updates for Office 365 from SCCM.
Thanks in advance!Funny thing you can't deploy those updates via WSUS and/ or ConfigMgr. See for more information:
http://blogs.technet.com/b/office_resource_kit/archive/2014/01/21/managing-updates-for-office-365-proplus-part-1.aspx
Also, make sure to read part 2 as it provides dome guidance on controlled testing of those updates.
My Blog: http://www.petervanderwoude.nl/
Follow me on twitter: pvanderwoude -
DW site to windows office 365 public facing?????
A tech consulting firm recently asked if I had the resources to convert existing websites, likely built with DW, to Office 365 public facing sites. Everything I have read about this software indicates that the process would be hellish, inasmuch as the MS program is designed for people with no web design skills whereas DW is designed for web design professionals.
I understand why a business owner would like to integrate everything into one package, but I don't think dumbing down the website is the answer. Has anyone else ever used this software?I feel like I'm losing my mind! Here is a Fortune 500 company web site using Sharepoint public facing: http://www.constellation.com/pages/default.aspx.
Just vaildated it; it contains 93 errors!! Another has a slow-moving Flash component that cannot be controlled by the user and looks like it was built in 1995 at best: http://www.viacom.com/Pages/default.aspx . It contains 59 errors.
What is going on here? The combination of "Cloud" computing and mobile devices is destroying web design! We are regressing! -
802.1x wireless authentication using NPS - SSO sign on to Office 365 using ADFS
Hi Spiceys,I'm researching for a potential client and would like to know if the following is possible:They have an existing wireless network with a working 802.1x implementation using NPS as RADIUS. They are very keen to move to Office 365 and use SSO and my understanding is that they'll need to spin up a working ADFS implementation to arrange this. We want to use Microsoft tech to tie it all in, so 3rd party SSO apps I don't want to investigate.If a wireless client is authenticated with NPS, and we have a working ADFS implementation are they able to access Office 365 resources without signing in twice? I'd imagine that the NPS auth would give them the necessary DC token, but if they access O365 resources and get redirected to the ADFS website and use Windows integrated login, will it 'just work' ? They are looking at using the full...
This topic first appeared in the Spiceworks Communitydid you find any resolution to this? our mba- mid 2013 deployment is having a very similar problem. We've gone through loads of troubleshooting and have yet to come to a resolution. all our mid 2012 mba's are working fine they're 10.7.5/10.8.4 mixed. console logs don't show much, i'll try the wireless diags tomorrow. our other 10.8.4 build appears fine on other models of machines. i've read posts about deleteing the adapters, deleting the system config plists and changing the mtu size, these steps do not work for us.
we don't have as high a failure rate with our deployment, but 25%-30% of our clients randomly drop connectivity and are unable to reconnect (fluttering wi-fi wave). when you slect the wifi symbol in the menu bar other wireless networks do not show, the 'looking for networks' fly wheel continues to spin. ocasionaly on login the yellow jelly bean will appear then disappear before finally timeing out without logging the user in (depsite having mobile accounts enabled). mostly the problem manifests itself when waking from sleep - the wifi symbol flutters endlessly without connecting. deleting the 8021x profile and readding it will reenable connectivity. we've tried new profiels, but to the same end. i know our certs and systems are fine because previous mac os x builds work fine as do our windows clients.
any input would be much appreciated. -
Retrieve list of site collections from Office 365 Tenenat
Hi
I have a requirement to create a list of all available Site collections in the given O365 tenancy. The purpose of this is to know what are the new site collections created and asisgn a owner for each site collection etc.
I found through client object model it is not possible to access Site collection level details. Is my understanding correct? Is it possible through REST API ? Please help.
Thanks in advance
KiranHi,
I am also facing same issue for acessing all site collections in Tenant using CSOM. Please help me for that. I have added TokenHelper class and other classes in my project but still am facing problem because of some methods used in Tokenhelper Class.
Below are the errors...
using Microsoft.IdentityModel.S2S.Protocols.OAuth2;
using Microsoft.IdentityModel.S2S.Protocols.OAuth2;but
i am not getting S2S in Microsoft.IdentityModel.dll
Added above References.
Error 1 The type or namespace name 'S2S' does not exist in the namespace 'Microsoft.IdentityModel' (are you missing an assembly reference?) D:\Rough Work\Test\Test\SharePointContext.cs 1 31 Test
Error 4 The type or namespace name 'OAuth2AccessTokenResponse' could not be found (are you missing a using directive or an assembly reference?) D:\Rough Work\Test\Test\TokenHelper.cs 154 23 Test
Anyone Please help me !!!!
Vivek Kumar Pandey -
Hi All
We have a requirement to retrieve data from SQl azure & consume it O365 Sharepoint hosted app parts. to expose SQL azure data we implemented Web API . Now we are struck at securing Web API. I found below flow in internet search.
In this process
Client component (App part) get IdP token ( signed SAML Responce) from sharepoint & sends IdP token to ACS, which validates the token signature & claims & issues Access Token(valid for 600sec) to client ,which would be forwarded to
Web API. where web Api validates & provides data.
Client - SharePoint Site (App parts)
Identity provider : Onelogin is our Identity provider.
Application : Web API
In this whole process . how to get IdP Token (SAML Response) from sharepoint in Sharepoint hosted appparts using client object model?
can any one help on this.
ragava_28Hi,
According to your post, my understanding is that you want to enable/disable the custom ribbon button accordingly.
We can use the EnabledScript attributes to achieve this scenario.
The EnabledScript attribute of the CommandUIHandler that will enable or disable the button depending on whether the function returns true or false.
There are some articles about this topic, you can refer to them.
http://dannyjessee.com/blog/index.php/2013/01/javascript-to-conditionally-enable-a-sharepoint-custom-ribbon-button/
http://aaclage.blogspot.com/2014/07/how-to-enabledisable-ribbon-buttons-by.html
http://dannyjessee.com/blog/index.php/2014/06/enabling-custom-ribbon-buttons-dynamically-based-on-multiple-selected-item-values-using-refreshcommandui-and-jsom/
Thanks,
Jason
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Jason Guo
TechNet Community Support -
I created a new mailbox user shared@. Then I shared the calendar to all the users in the company. When a user sends a meeting invitation, I only want that user to get a confirmation. Currently, everyone without delegation rights are unable
to get the invite response. Also, everyone with the delegation rights are receiving ALL responses, even to the events they did not send. How do I share a calendar and when that user sends a meeting invitation only that user gets a response?
*I know I can do a public folder, but I saw that public calendar is only available in Outlook. Users need it to work on mobile devices.hi, when you set multiple delegates, the response will sent to all delegates regardless of who send the meeting request.
To work around this, try to send the meeting request from the user's account and invite the shared mailbox as attendee.
Flynn
Maybe you are looking for
-
Html template for approve/ reject sc
Hi there, Whats the HTML tempalte for the approve / reject SC. There is button called 'change' in the approval screen of the approval. I want to remove this button through html modifcation. has anybody done thsi befor / how to achieve this. Please he
-
NullPointerException trying to execute CallableStatement
oracle.jbo.domain.Number jobId = null; Connection conn = getCurrentConnection(); statement = getDBTransaction().createCallableStatement("{ ? = CALL submit_refresh_actuals(1) }", 0); statement.registerOutParameter(1, OracleType
-
More formatting (ordered lists)
I want to create an ordered list with some instructions for the Adobe Reader forum (thanks to Ankit_Jain for the original instructions): Download Microsoft's SubinACL tool from http://www.microsoft.com/downloads/details.aspx?FamilyID=e8ba3e56-d8fe -4
-
Document posted with wrong profit center
Hi guru, I posted a FI document but I wrong the profit center. The profit center is PC dummy but I want that the posting is on another profit center. My client doesn't want to create a PC document for correct this mistake. Is there any way for assign
-
Requesting Books From Sony Store
I have requested a book through the Sony Store. Since I have not had a reply, I question what the process is to be able to get a book that is not in ebook format? Has this been done before or does it take a certain number of request to get the book i